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

相关文章
相关标签/搜索