News for hackers. Stuff that matters.
Re:Distrusting git by fphilipe on Saturday October 01, 2011 @01:28PM (#3060522)
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.
Re:Distrusting git by davvid on Saturday October 01, 2011 @01:37PM (#3060553)
I 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.
Re:Distrusting git by fphilipe on Saturday October 01, 2011 @03:30PM (#3060882)
Yeah, you're right. I must have misread the question.

Didn't know about `git pull --rebase`. Thanks for that.