当前位置:   article > 正文

Git出现There is no tracking information for the current branch提示的解决办法

there is no tracking information for the current branch. please specify whic

Git出现There is no tracking information for the current branch提示的解决办法

使用命令新建分支并切换到该分支

git checkout -b feature/wangshuang-map
  • 1

从远程获取代码

git pull
  • 1

报错

There is no tracking information for the current branch.
Please specify which branch you want to merge with.
意思是没有当前分支的追踪信息

解决:

git push origin feature/wangshuang-map
git branch --set-upstream-to=origin/feature/wangshuang-map feature/wangshuang-map
  • 1
  • 2

以上两行命令可简写为

git push -u origin  feature/wangshuang-map
  • 1

即将本地分支推送到远程,然后把本地分支feature/wangshuang-map与远程仓库origin里的分支feature/wangshuang-map建立关联
建立关联后再次执行git pull命令则成功

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/从前慢现在也慢/article/detail/392514
推荐阅读
相关标签
  

闽ICP备14008679号