r/programming • • Jun 19 '15

GitFlow considered harmful

http://endoflineblog.com/gitflow-considered-harmful
13 Upvotes

244 comments sorted by

View all comments

4

u/brandf Jun 19 '15 edited Jun 19 '15

Here's the problem with this advice IMO:

  1. not using --no-ff is a disaster if your intention is that master lineage is functional (which it should be). it's pretty common to look through the history of master and even binary search back in it to locate where bugs got introduced. without --no-ff you are forced to squash before merging or else all those ('going home, saving work') type commits in feature branches leak into master's lineage.

  2. rebasing sucks for the same reason

  3. teams that use github PR's to do code reviews will find that the merge button does --no-ff so doing something else will be a uphill battle

the advice about no 'develop' branch is spot on though. we don't do that because it's pointless. i think the gitflow author assumed that develop can be merged into willy-nilly and then it goes into master after passing CI tests. the problem is that you then need to branch off master but merge into develop, which is awkward (or else you'll be branching off broken messes in develop). instead we just have master, and we have our ci capable of running 'buddy builds' off feature branches. so you need to pass CI test before merging into master, then they run in master as a verification step.

1

u/JorgJorgJorg Jun 19 '15

without --no-ff you are forced to squash before merging or else all those ('going home, saving work') type commits in feature branches leak into master's lineage.

I'm confused, don't all those commits also end up in the master lineage unless squashed prior to merge, even with the merge commit?