git学习--使用git pull命令"当前分支没有跟踪信息"报错问题的解决

一、问题描述

今天晚上在查看github上的某个组织下的项目仓库的远程时,删除了某个远程链接,结果在调用git pull命令同步更新时报错,错误信息如下:

来自 github.com:iWebStudio314/ExperimentEvaluationSystem
   9cbcd0a..0bde444  master     -> origin/master
当前分支没有跟踪信息。
请指定您要合并哪一个分支。
详见 git-pull(1)。

    git pull <remote> <branch>

如果您想要为此分支创建跟踪信息,您可以执行:

    git branch --set-upstream-to=origin/<branch> master

05

二、问题背景

1.使用命令git pull命令报错:

Warning: Permanently added the RSA host key for IP address '192.30.255.113' to the list of known hosts.
Already up-to-date.

01
2.git remote查看当前仓库的所有远程链接,如下:

origin  git@github.com:iWebStudio314/ExperimentEvaluationSystem.git (fetch)
origin  git@github.com:iWebStudio314/ExperimentEvaluationSystem.git (push)
sys git@github.com:iWebStudio314/ExperimentEvaluationSystem.git (fetch)
sys git@github.com:iWebStudio314/ExperimentEvaluationSystem.git (push)

04
3.git branch查看分支情况:

* master
  remotes/origin/HEAD -> origin/master
  remotes/origin/master
  remotes/sys/master

03
4.删掉’sys’远程
5.重新git pull一下,报错如下:

来自 github.com:iWebStudio314/ExperimentEvaluationSystem
   9cbcd0a..0bde444  master     -> origin/master
当前分支没有跟踪信息。
请指定您要合并哪一个分支。
详见 git-pull(1)。

    git pull <remote> <branch>

如果您想要为此分支创建跟踪信息,您可以执行:

    git branch --set-upstream-to=origin/<branch> master

05

三、问题原因

四、问题解决

按照提示重新为git pull添加跟踪分支即可。
使用命令:

git branch –set-upstream-to=origin/master master

06

  • 5
    点赞
  • 11
    收藏
    觉得还不错? 一键收藏
  • 1
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值