一、问题描述
今天晚上在查看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
二、问题背景
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.
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)
3.git branch查看分支情况:
* master
remotes/origin/HEAD -> origin/master
remotes/origin/master
remotes/sys/master
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
三、问题原因
四、问题解决
按照提示重新为git pull添加跟踪分支即可。
使用命令:
git branch –set-upstream-to=origin/master master