CUBA Project+GIT Workflow

Maybe this question is generic, but because (for several reasons) our team does not come from a VCS background, I ask for advice on team working on a CUBA project + GIT.

This is the scenario.

  • 2 Developers, each one with CUBA and GIT ready to fight.
  • A Bitbucket project (right now with 1 repository). Right now, in this repository there is a starting (empty) CUBA project.
  • Both has the project cloned in their computers.
  • A lot of ideas and job to do.
  • Both developers will work from the empty project from start.

What I don’t have clear is the exact workflow.
Should I branch “master” and merge in my local computer? Or push my branch to cloud and pull-request from my branch to master?
Have a branch for each developer is a good practice? Or I’m mixing things here?
When each developer should checkout again to get “others developers” changes from cloud?

I would appreciate help on this. We are not git users at all, and last time we tried to use it was a pain (but mainly because the development software we were using), then, we have no idea and practice at all on how to team-develop with git.

Thanks.

Hey @giuseppe!

For fast start read this book.

1 Like

Hi @giuseppe

A good workflow that we use here in CUBA is the following:

  1. you should create a master branch on a server that will contain completed features;
  2. when some developer starts working with some new feature he creates a new branch (branched from master) for it and commits all changes to it;
  3. when a feature is completed (reviewed, tested, etc) developer squashes all commits to one and pushes it to the master branch.

It is an answer for the first question.

Have a branch for each developer is a good practice? Or I’m mixing things here?

In fact it’s okay to have a branch for separate feature.

When each developer should checkout again to get “others developers” changes from cloud?

Each developer should pull changes from the master branch when he plans to start working with new feature and creates new branch for it. It reduces a probability of merge conflicts appearing.

Best regards,
Daniil

2 Likes