更新GitHub项目出现There is no tracking information for the current branch. Please specify which branch you

git pull命令用于从另外一个存储库或本地分支获取并集成(整合)。git pull命令的做用是:取回远程主机某个分支的更新,再与本地的指定分支合并,它的完整格式稍稍有点复杂。git

若是当前分支只有一个追踪分支,连远程主机名均可以省略。shell

$ git pull

上面命令表示,当前分支自动与惟一一个追踪分支进行合并。code

 

当出现上面的状况时,咱们能够有两种解决方法orm

对于这种状况有两种解决办法,就好比说要操做master吧,一种是直接指定远程master:blog

git pull origin master

 

另一种方法就是先指定本地master到远程的master,而后再去pull:it

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

这样就不会再出现“There is no tracking information for the current branch”这样的提示了。

io

相关文章
相关标签/搜索