2013-11-01 46 views
0

我在git中工作,如果我在我的develop分支中做了git pull,我得到以下错误。我如何解决这个问题,让它停止?使用git pull的错误消息?

You asked me to pull without telling me which branch you 
want to merge with, and 'branch.develop.merge' in 
your configuration file does not tell me, either. Please 
specify which branch you want to use on the command line and 
try again (e.g. 'git pull <repository> <refspec>'). 
See git-pull(1) for details. 

If you often merge with the same branch, you may want to 
use something like the following in your configuration file: 
    [branch "develop"] 
    remote = <nickname> 
    merge = <remote-ref> 

    [remote "<nickname>"] 
    url = <url> 
    fetch = <refspec> 

See git-config(1) for details. 

回答

0

如错误消息所示,您需要指定要拉取的分支。例如,如果你想从远程origin拉分支master,你必须使用命令

git pull origin master 
0

您可能需要设置你的本地分支用于跟踪远程分支发展。

假设您的远程命名为原点,远程分支机构股你可以通过git branch --set-upsteam-to origin/develop develop

做相同的名称,您应该然后能够做到git pull无需指定远程/分支(假设你的开发分支检查出来!)

+0

看来正确的命令是'git branch - set-upsteam-develop origin/develop' – MOHRE