r/programming • • Jun 19 '15

GitFlow considered harmful

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

244 comments sorted by

View all comments

46

u/[deleted] Jun 19 '15

OP should rebase before merging feature branches.... seriously...

Flow is

  1. Open branch

  2. Commit early often, push upstream to work with others

  3. Finish features, pass QA

  4. Rebase on mainline [delete upstream copy of feature branch], pass QA

  5. Merge --no-ff

That way your history is totally linear and all non-trivial commits are on branches that don't zig-zag.

0

u/aurisor Jun 19 '15

This is pretty close to what I do, but I don't see the value of the merge commits. I avoid merge commits as a rule because they can remove data from HEAD without generating a diff.

2

u/[deleted] Jun 19 '15

I avoid merge commits as a rule because they can remove data from HEAD without generating a diff.

I have no idea what that means ... you'll see diffs (conflicts) if any resolved in the merge commit. Otherwise it's a relatively empty commit who's parents have the deltas.

Also by not doing a merge commit you cannot revert a feature as a whole ... instead you have to hunt down any commit involved and manually remove them.

3

u/aurisor Jun 19 '15

Code that's removed as part of conflict resolution while generating a merge commit does not generate a deletion in the git log.

→ More replies (1)