Git Pull - There is no tracking information for the current branch.

有时我们用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,问题已解决。

猜你喜欢

转载自josh-persistence.iteye.com/blog/1936805