3 ms·
It rewinds your work, fast forwards to the fetched branch and applies your work on top of it. It doesn't create a merge commit, which can pollute your tree unne
by fphilipe 15y ago
It rewinds your work, fast forwards to the fetched branch and applies your work on top of it. It doesn't create a merge commit, which can pollute your tree unnecessarily.
- davvid 15y agoI believe you're describing "git rebase". e.g. git fetch git rebase origin/master instead of: git pull which you can also do with: git pull --rebase But really, the preferred way is to use topic branches. So if you're on branch "foo", this is how you integrate into master. git checkout master # because it always matches upstream git pull # this will always fast-forward git merge foo git push That does create a merge commit but it does it in the right direction (master 1st parent, topic branch 2nd). You get to see the parallel development which is good to preserve in the history. Otherwise, rebasing is nice because it keeps the history linear.
- fphilipe 15y agoYeah, you're right. I must have misread the question. Didn't know about `git pull --rebase`. Thanks for that.