1. 程式人生 > >git 報錯 gitThere is no tracking information for the current branch. Please specify which branch you w

git 報錯 gitThere is no tracking information for the current branch. Please specify which branch you w

新建本地分支後將本地分支推送到遠端庫, 使用git pull 或者 git push 的時候報錯

gitThere 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> merged0.9.6


是因為本地分支和遠端分支沒有建立聯絡  (使用git branch -vv  可以檢視本地分支和遠端分支的關聯關係)  .根據命令列提示只需要執行以下命令即可

git branch --set-upstream-to=origin/遠端分支的名字 本地分支的名字