1. 程式人生 > >Git: There is no tracking information for the current branch.

Git: There is no tracking information for the current branch.

在執行git pull的時候,提示當前branch沒有跟蹤資訊:

git pull
There is no tracking information for the current branch.
Please specify which branch you want to merge with.

對於這種情況有兩種解決辦法,就比如說要操作master吧,一種是直接指定遠端master:

git pull origin master

另外一種方法就是先指定本地master到遠端的master,然後再去pull:

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

這樣就不會再出現“There is no tracking information for the current branch”這樣的提示了。