在執行git pull的時候,提示當前branch沒有跟蹤信息: $> git pull There is no tracking information for the current branch. Please specify which branch you want to merge w... ...
在執行git pull的時候,提示當前branch沒有跟蹤信息:
$> 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-to=origin/<branch> localdev
對於這種情況有兩種解決辦法,就比如說要操作 localdev 吧,一種是直接指定遠程 master(localdev 是當前本地分支,master 是遠程主分支):
git pull origin master
另外一種方法就是先指定本地 localdev 到遠程的 master ,然後再去pull(推薦方案):
$> git branch --set-upstream-to=origin/master localdev
$> git pull
這樣就不會再出現“There is no tracking information for the current branch”這樣的提示了。
收工~