我正在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.
答案 0 :(得分:0)
正如错误消息所示,您需要指定要拉出的分支。例如,如果要从远程master
中提取分支origin
,则必须使用命令
git pull origin master
答案 1 :(得分:0)
您可能需要设置本地分支以跟踪远程开发分支。
假设您的遥控器名为origin,而远程分支名称相同,您可以通过git branch --set-upsteam-to origin/develop develop
然后,您应该能够在不指定远程/分支的情况下执行git pull
(假设您已检出开发分支!)