configure git so that "git pull" instead of "git pull origin master"?
Using git pull
used to pull from the remote repository as expected - now, it's asking me to use git pull origin master
. I don't quite understand the instructions it's giving me, saying I can add something to my configuration file:
[branch "master"]
remote = <nickname>
merge = <remote-ref>
[remote "<nickname>"]
url = <url>
fetch = <refspec>
Right 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'm guessing I need to add
[branch "master"]
remote = origin
merge = ??
What does "merge" need as its argument? What's a remote-ref(erence?)? I tried looking at http://git-scm.com/docs/git-config but it seems to be more about the command itself.
Thanks in advan开发者_运维百科ce!
try:
[branch "master"]
remote = origin
merge = refs/heads/master
It should be enough just to execute
git config branch.master.remote origin
Just do:
git branch --set-upstream master origin/master
An easy way is to use git checkout -t
to have the tracking set up when you create the local branch.
精彩评论