Git Error:There is no tracking information for the current branch. - Go语言中文社区

Git Error:There is no tracking information for the current branch.


在执行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 是远程主分支):

git pull origin master 

另外一种方法就是先指定本地 localdev 到远程的 master ,然后再去pull(推荐方案):

$> git branch --set-upstream-to=origin/master localdev 
$> git pull

这样就不会再出现“There is no tracking information for the current branch”这样的提示了。

收工~

版权声明:本文来源博客园,感谢博主原创文章,遵循 CC 4.0 by-sa 版权协议,转载请附上原文出处链接和本声明。
原文链接:https://www.cnblogs.com/x00479/p/11313425.html
站方申明:本站部分内容来自社区用户分享,若涉及侵权,请联系站方删除。
  • 发表于 2019-11-09 11:15:57
  • 阅读 ( 1100 )
  • 分类:

0 条评论

请先 登录 后评论

官方社群

GO教程

猜你喜欢