有时我们用git clone克隆一个项目后,如果再使用git pull试图去更新最新代码时,会碰到如下的问题:
$ 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 master origin/<branch>
解决方案: 执行git 命令: git push -u origin master
重新执行git pull,问题已解决。
本文介绍了当使用Git从远程仓库拉取代码时遇到没有跟踪信息的问题及其解决方法。通过设置分支跟踪信息并推送更新,可以顺利进行代码同步。
6339

被折叠的 条评论
为什么被折叠?



