I’m working on a project where we’re trying to get to grips with using git in the most efficient manner (for us) and have decided to create 2 branches for 2 sub-teams to work on, along side the master branch.
Sometimes we will commit into master if it’s something generic that should go into both branches and then we want those changes in the both of the other branches.
-
Should that be a merge or a rebase into the 2 other branches?
-
Is this an insane workflow to be going down the route of? If so, suggestions please!
I don’t see the point of creating two branches for two teams. Work should be separated depending on its nature, not on who will work on it.
This is what I’d suggest:
When you have a feature, bug fix, or a ticket that should be processed: create a branch feat-something, and work in there.
This is (basically) how we work on a very big project. You can work without the dev branch if your project isn’t big.
Check out this famous article that shows a pretty well done workflow: A successful Git branching model.