git 報錯There is no tracking information for the current branch.

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

gitThere is no tracking information for the current branch.this

Please specify which branch you want to merge with.命令行

See git-pull(1) for detailscode

git pull <remote> <branch>

If you wish to set tracking information for this branch you can do so with:orm

git branch --set-upstream-to=origin/<branch> merged0.9.6

是由於本地分支和遠程分支沒有創建聯繫 (使用git branch -vv 能夠查看本地分支和遠程分支的關聯關係) .根據命令行提示只須要執行如下命令便可ci

git branch --set-upstream-to=origin/遠程分支的名字(個人是master) 本地分支的名字(個人是master)rem

相關文章
相關標籤/搜索