There is no tracking information for the current branch

There is no tracking information for the current branch.

原因

当前分支没有关联的远程分支,也就是说当前分支push和pull时不知道去远程仓库的哪个分支进行拉取或者推送

造成这个问题往往是在本地分支和远程分支未关联的情况下使用git push或者git pull忽略了参试导致

解决方案

方案一
#当前本地分支关联远程分支
git branch --set-upstream-to=仓库名(origin)/分支名
#拉取
git pull
#推送
git push
方案二
#拉取和推送时,指定远程仓库分支名
git pull 仓库名(origin) 分支名
git push 仓库名(origin) 分支名

猜你喜欢

转载自blog.csdn.net/qq_43203949/article/details/128244759