Git配置过程中出现错误的解决办法
Eave
2016.03.13 21:53
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.
出现上面错误的原因是因为本地分支和远程分支没有一一对应的缘故,可以执行一下命令来解决问题:
$ git config branch.develop.remote origin
$ git config branch.develop.merge refs/heads/develop