最好在一个例子中解释一下:我在存储库的分支0.58上,这是我的拉法:
git pull origin 0.58
当我只称“ git pull”时,我得到:
ip238:openlierox az$ git pull
You asked me to pull without telling me which branch you
want to merge with, and 'branch.0.58.merge' in
your configuration file does not tell me either. Please
name which branch you want to merge on the command line and
try again (e.g. 'git pull <repository> <refspec>').
See git-pull(1) for details on the refspec.
If you often merge with the same branch, you may want to
configure the following variables in your configuration
file:
branch.0.58.remote = <nickname>
branch.0.58.merge = <remote-ref>
remote.<nickname>.url = <url>
remote.<nickname>.fetch = <refspec>
See git-config(1) for details.
当我检查分支时,似乎可能忘记了某些选项(--track?)。无论如何,我现在已经设置了:
git config branch.0.58.merge 0.58
git config branch.0.58.remote origin
这似乎可行。然后,仅出于兴趣,我查看了有关这些设置的其他分支:
ip238:openlierox az$ git config branch.0.57.merge
refs/heads/0.57
ip238:openlierox az$ git config branch.0.57.remote
origin
我现在想知道,“ 0.58”之间是否有区别?还是应该指定“ refs / heads / 0.58”?
到底有什么区别?
heads并带有一个“ s”。