DEV Community

Discussion on: Git-flow, non-technical intro.

Collapse
 
_gdelgado profile image
Gio

There's only one branch that you commit to. There's no notion of a develop, staging and master branch.

I've had experiences using gitflow with teams of 10+ engineers where there are enormous merge conflicts due to inconsistencies between those develop, staging and master branches - the most obvious being when a patch lands in master but the developer forgets to add that patch back into staging and develop. Gitflow is too complicated to do correctly with so many people.

With trunk-based development you also let your developers merge to mainline when they're ready. There's no code review required (pair programming is a better alternative IMO) but a dev can certainly request a review if they need it. This leads to low friction to getting code into production. And leads to a design that allows for multiple production deployments per day with little effort on any particular person.

Thread Thread
 
theowlsden profile image
Shaquil Maria

Thanks for the elaboration!

I've had experiences using gitflow with teams of 10+ engineers where there are enormous merge conflicts due to inconsistencies between those develop, staging and master branches

I've seen these conflicts before too. As a junior I thought it was just human error and it's not something that would hinder the development in the long run. Guess I was wrong.

Trunk-based sound great for big teams, I'll have to look into it and see if and how I can propose it to the team when I'm more familiar with it.