Comments:"JRB : git pull --rebase until it hurts"
URL:http://jrb.tumblr.com/post/49248876242/git-pull-rebase-until-it-hurts
git pull —rebase until it hurts
So Please, oh please, use git pull —rebase has been doing well on hackernews today, and everyone’s been chiming in with their thoughts, so here are mine.
Every single time I want to update my branch
git pull --rebase
If that works, great! If instead it gives me the slightest amount of sass and suggests I might want to fiddle with commits and stuff…
git rebase --abort && git pull
Why?
First up: I am lazy and that is easy.
Secondly, I feel it’s the most accurate representation of the project history at that point. It’s essentially an anonymous branch. You and the upstream repository diverged for a while, you did some work, then you adjusted it so the repositories are in line again. Maybe you should have explicitly branched, but hey, we’re all human.
Otherwise you’re a weird kind of pedant that thinks it’s better to pretend your commits were intermingled with the upstream commits in real time than you just did an informal branch.