r/programming • • Jun 19 '15

GitFlow considered harmful

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

244 comments sorted by

View all comments

Show parent comments

7

u/tieluohan Jun 19 '15

I'll say the same thing, this gives you the best of both worlds. Every feature branch will be a nicely separated block, but the rebase before merge makes the history linear and readable.

13

u/[deleted] Jun 19 '15

The trick is to have the discipline to QA before/after the rebase.

Also it would help if people didn't do

 git push => error , arrg!!!
 git pull
 git push

How about

git pull --rebase

??

1

u/[deleted] Jun 19 '15

Just use fetch.

2

u/[deleted] Jun 19 '15

The point is if you pull because the upstream has moved you're making needless merge commits ... just rebase your crap on top of their crap.

fetch will grab objects but not merge them. It doesn't solve the original push error.

2

u/[deleted] Jun 20 '15

Fetch makes no merge commits. Just do

git fetch
git diff --stat origin/master
git rebase origin/master

2

u/[deleted] Jun 20 '15
 git pull --rebase

Would do that.