Git之提示There is no tracking information for the current branch.

举报
chenyu 发表于 2021/07/26 22:59:52 2021/07/26
【摘要】 1 问题 我项目比如是0.2分支,我需要修改项目的git地址,然后再pull新的代码 1)修改github地址(读者可以忽略) 1.git remote 查看所有远程仓库2.git remote rm origin 删除之前的版本库3.git remote add origin http://****.git 增加新的地址 项目已经切换新的git地址了,然后我现在需要...

1 问题

我项目比如是0.2分支,我需要修改项目的git地址,然后再pull新的代码

1)修改github地址(读者可以忽略)


  
  1. 1.git remote 查看所有远程仓库
  2. 2.git remote rm origin 删除之前的版本库
  3. 3.git remote add origin http://****.git 增加新的地址

项目已经切换新的git地址了,然后我现在需要拉代码

git pull

 

提示错误如下

 


  
  1. IGG@A12128 MINGW64 /f/browesr/program/*** (**-0.2)
  2. $ git pull
  3. There is no tracking information for the current branch.
  4. Please specify which branch you want to merge with.
  5. See git-pull(1) for details.
  6. git pull <remote> <branch>
  7. If you wish to set tracking information for this branch you can do so with:
  8. git branch --set-upstream-to=origin/<branch> browser-0.2

说明提示当前branch没有跟踪信息

 

 

 

 

 

 

 

 

2 解决办法


  
  1. git branch --set-upstream-to=origin/当前分支名字 当前分支名字
  2. git branch --set-upstream-to=origin/****-0.2 ****-0.2
git pull
 

就可以了

文章来源: chenyu.blog.csdn.net,作者:chen.yu,版权归原作者所有,如需转载,请联系作者。

原文链接:chenyu.blog.csdn.net/article/details/109752322

【版权声明】本文为华为云社区用户转载文章,如果您发现本社区中有涉嫌抄袭的内容,欢迎发送邮件进行举报,并提供相关证据,一经查实,本社区将立刻删除涉嫌侵权内容,举报邮箱: cloudbbs@huaweicloud.com
  • 点赞
  • 收藏
  • 关注作者

评论(0

0/1000
抱歉,系统识别当前为高风险访问,暂不支持该操作

全部回复

上滑加载中

设置昵称

在此一键设置昵称,即可参与社区互动!

*长度不超过10个汉字或20个英文字符,设置后3个月内不可修改。

*长度不超过10个汉字或20个英文字符,设置后3个月内不可修改。