r/coding • u/alexcasalboni • Jun 19 '15
GitFlow considered harmful
http://endoflineblog.com/gitflow-considered-harmful3
Jun 19 '15
Just a difference of opinion on how things should flow. What works for him may not work for you. Personally, I like the Gitflow way and my company hasn't had any problems with it except for the occasional branch off/merge to the wrong main branch, but that's more of a PM/communication issue than a workflow issue. We absolutely need two main branches because we're always working on new features while QAing and fixing a release, and doing hotfixes for production.
2
Jun 20 '15
I also disagree with "not having two branches" - after all, they cost you nothing - but his main emphasis is on the
--no-ffflag, which I agree seems totally wrong to me.1
1
u/bamfg Jun 20 '15
How would you review a new feature if the commits are mixed in with every other piece of work going on at the same time? Or does the author advocate a single commit per feature/item of work?
9
u/imMute Jun 20 '15
I absolutely disagree with his indictment of
--no-ff. The purpose of--no-ff(in GitFlow) is so you can dogit log --first-parent ...ondevelopand see what features have been integrated, without being distracted by how those features were implemented. In fact, your release notes could be as simple as using thatgit log --first-parent ...with some extra options to pretty it up. Differentiating a group of commits that belong to a single feature is significantly easier when using--no-ff: just look at the two commit histories he presents. Looking at the second one, it's difficult to determine which commits were part of a specific feature.I sort-of agree with him about the "master" branch (used for release
commitsmerges only) is slightly redundant. Having that single branch makes having multiple minor releases out simultaneously impossible: ie, I release 1.0 now, then 2.0 some time later, then 1.1 & 2.1 after that (because I found a security bug that was hotfixed on both releases). OTOH, you could argue that having the release branch has the same advantages asdevelop/feature-*(like the--no-ffabove) except formaster/hotfix-*.A title of "$FOO considered harmful" seems pretty inflamatory to me. A better title (I think) would have been "A simpler alternative to GitFlow".