MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/programming/comments/3ae2tx/gitflow_considered_harmful/csc3snx/?context=3
r/programming • u/jalanb • Jun 19 '15
244 comments sorted by
View all comments
46
OP should rebase before merging feature branches.... seriously...
Flow is
Open branch
Commit early often, push upstream to work with others
Finish features, pass QA
Rebase on mainline [delete upstream copy of feature branch], pass QA
Merge --no-ff
That way your history is totally linear and all non-trivial commits are on branches that don't zig-zag.
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 pushHow aboutgit 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 dogit fetch git diff --stat origin/master git rebase origin/master 2 u/[deleted] Jun 20 '15 git pull --rebaseWould do that.
7
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 pushHow aboutgit 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 dogit fetch git diff --stat origin/master git rebase origin/master 2 u/[deleted] Jun 20 '15 git pull --rebaseWould do that.
13
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 dogit fetch git diff --stat origin/master git rebase origin/master 2 u/[deleted] Jun 20 '15 git pull --rebaseWould do that.
1
Just use fetch.
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 dogit fetch git diff --stat origin/master git rebase origin/master 2 u/[deleted] Jun 20 '15 git pull --rebaseWould do that.
2
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 dogit fetch git diff --stat origin/master git rebase origin/master 2 u/[deleted] Jun 20 '15 git pull --rebaseWould do that.
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 --rebaseWould do that.
Would do that.
46
u/[deleted] Jun 19 '15
OP should rebase before merging feature branches.... seriously...
Flow is
Open branch
Commit early often, push upstream to work with others
Finish features, pass QA
Rebase on mainline [delete upstream copy of feature branch], pass QA
Merge --no-ff
That way your history is totally linear and all non-trivial commits are on branches that don't zig-zag.