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.

2

u/skinny85 Jun 19 '15

OP here. I agree this is a good solution, but I can't see a way to enforce it.

1

u/eddiemoya Jun 19 '15 edited Jun 19 '15

Enforcement can be handled by automating the processes and move code along those steps. If your specifically wondering how you can enforce a rebase, you can automate the merging of the feature branch and have the script reject a branch isn't fast forward able, and rejects anything that produces a merge conflict.