Configure git so that "git pull" instead of "git pull origin master"?

Using git pull used to retrieve from remote storage, as expected, now it asks me to use git pull origin master . I do not quite understand the instructions that he gives me, saying that I can add something to my configuration file:

 [branch "master"] remote = <nickname> merge = <remote-ref> [remote "<nickname>"] url = <url> fetch = <refspec> 

Now my configuration file looks like

 [core] repositoryformatversion = 0 filemode = true bare = false logallrefupdates = true ignorecase = true [remote "origin"] url = |redacted| fetch = +refs/heads/*:refs/remotes/origin/* 

So, I guess I need to add

 [branch "master"] remote = origin merge = ?? 

What is a merge as an argument? What is remote-ref (erence?)? I tried looking at http://git-scm.com/docs/git-config , but it seems to be more about the team itself.

Thanks in advance!

+44
git
Nov 28 '10 at 16:35
source share
4 answers

to try:

 [branch "master"] remote = origin merge = refs/heads/master 
+44
Nov 28
source share

Simple enough to do

 git config branch.master.remote origin 
+21
Nov 28 '10 at 17:36
source share

Just do:

 git branch --set-upstream master origin/master 
+11
Jan 15
source share

An easy way is to use git checkout -t to configure tracking when creating a local branch.

+3
Nov 28 '10 at 20:03
source share



All Articles