在执行git pull的时候,提示当前branch没有跟踪信息:
$> git pull
There is no tracking information for the current branch.
Please specify which branch you want to merge with.
See git-pull(1) for details.
git pull <remote> <branch>
If you wish to set tracking information for this branch you can do so with:
git branch --set-upstream-to=origin/<branch> localdev
对于这种情况有两种解决办法,就比如说要操作 localdev 吧,一种是直接指定远程 master(localdev 是当前本地分支,master 是远程主分支):
另外一种方法就是先指定本地 localdev 到远程的 master ,然后再去pull(推荐方案):
$> git branch --set-upstream-to=origin/master localdev
$> git pull
这样就不会再出现“There is no tracking information for the current branch”这样的提示了。
收工~
版权声明1:本文来源博客园,感谢博主原创文章,遵循 CC 4.0 by-sa 版权协议,转载请附上原文出处链接和本声明。
原文链接:https://www.cnblogs.com/x00479/p/11313425.html
站方申明:本站部分内容来自社区用户分享,若涉及侵权,请联系站方删除。