dropshado.ws

Front-end development minutiæ

by David DeSandro

Archive
RSS feed
Twitter
GitHub Pages mirror

How do you get git to always pull from a specific branch? - Stack Overflow

Head:

If you prefer, you can set these options via the commmand line (instead of editing the config file) like so:

$ git config branch.master.remote origin 
$ git config branch.master.merge refs/heads/master

Or, if you’re like me, and want this to be the default across all of your projects, including those you might work on in the future, then add it as a global config setting:

$ git config --global branch.master.remote origin 
$ git config --global branch.master.merge refs/heads/master

I’m trying out the global option as I never remember how to do this.

5 Nov 2010
  • git
  • desandro.com
  • @desandro
  • github.com/desandro
  • desandro’s JS Fiddles