Is Git Flow Merging Strategy an Anti-Pattern?

branchinggitgitflowworkflows

My company is using Git, and is using a peculiar branching scheme – work is done in master, and branches are reserved for releases. This works fine, so long as all of the work done in an iteration makes it into the branch, but if a critical production issue comes up, we have to ensure that the work somehow makes it into both branches.

Lately, we've been having some "fun" with those branches. It's been an administrative headache, ensuring that all of the work makes it into every branch, and some bugs which have been fixed on one branch don't make it into master until someone points it out, which is concerning.

I came across Git Flow a while back, and I feel that it would be a solution to our problem – code not percolating all the way to the release, or all the way back down. The only catch is that my lead stated that this sort of development was an anti-pattern – developing furiously for two weeks, then spending three to resolve the merge conflicts.

I'm not entirely sure I agree, and since I brought it up, work has resumed like normal. Only recently have we had some major pain points with this.

I'd like to know – why would this sort of development scheme be seen as an anti-pattern? Is it really an anti-pattern?

Best Answer

He's mostly referring to the feature branches side of the model. Feature branches were declared an anti-pattern a long time ago when the branches lasted for months and version control systems couldn't merge to save their life. Feature branches that last a week or two have much fewer issues, especially if you're continually merging from develop into the feature branch during that time. Anything much longer than that is still not recommended.

Even if you don't use the feature branch side of git flow, the other parts are useful in ensuring you get clean merges and your changes are propagated in the right direction.