Git Workflow for Multiple Teams

gitversion controlworkflows

We are going to start using Git (not using it yet), and I want to define the workflow.

We have 4 teams at 4 different global locations, developing together the same product. Each team owns a part of the product's code, but sometimes they also have to make changes in the code owned by other teams.

Is there a recommendation for a Git workflow for such an environment?

I have already seen this article, but the approach here is "we create additional branches as seldom as possible", and I believe more in "branch for each user story" approach.

Also, this article presents a nice approach.

I had in mind having a master branch, a permanent branch per each team periodically merging to master, and a per-user-story branches merging to the teams' branches. Does it make sense, or it wouldn't work?

Best Answer

Take a look at Successful Git Branching Model, which has a nice branching strategy for feature development across releases.

A Successful git branching model

You could implement something similar with one extra level for team branches between the 'develop' branch and the 'feature branches'. Having team branches would also allow two teams to collaborate more effectively by merge between their team branches.