0

我正在工作,git如果我git pull在我的develop分支中执行操作,我会收到以下错误。我该如何解决这个问题,让它停止?

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.
4

2 回答 2

0

您可能需要设置本地分支来跟踪远程开发分支。

假设您的遥控器名为 origin,并且远程分支共享相同的名称,您可以通过git branch --set-upsteam-to origin/develop develop

然后,您应该能够git pull不指定远程/分支(假设您已签出开发分支!)

于 2013-11-01T16:00:34.643 回答
0

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

git pull origin master
于 2013-11-01T15:47:24.287 回答