There is no tracking information for the current branch

There is no tracking information for the current branch.

reason

The current branch has no associated remote branches , which means that when the current branch is pushed or pulled, it does not know which branch of the remote warehouse to go to to pull or push.

This problem is often caused by using git push or git pull when the local branch and the remote branch are not associated, and ignoring the test.

solution

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

Guess you like

Origin blog.csdn.net/qq_43203949/article/details/128244759
Recommended