Joined January 2013
·

Orodio

Senior front end developer at SitePoint
·
Melbourne Australia
·
·
·

Posted to Vim stuff everyone should know about over 1 year ago

The last one is the first thing I do on any new computer.

Ahh. That makes more sense than, haha

In the git man pages it says this:

More precisely, git pull runs git fetch with the given parameters and calls git merge to merge the retrieved branch heads into the current branch.

So is this not doing the same thing?

Personally I am a fan of git fetch | git rebase origin/master Which will take any commits I've done and force them to the end of the history. This works especially nice in feature branches (I never commit to master, branches are cheap) because you don't get the annoying merged master commits and allows you to keep local master completely clean and in parity with origin/master

The flow in a feature branch would look something like this.

A--B--D  - master (parity with origin/master)
    \
     C--E  - local feature branch

Running git fetch | git rebase origin/master will then produce

A--B--D - master
       \
        C--E

Which once it is merged with master will look like

A--B--D--C--E
Achievements
60 Karma
554 Total ProTip Views