Error: leaving XXXX; does not track upstream.

解决方式一

这个博客 https://www.cnblogs.com/surong/p/3381346.html 有提到一种解决方式,即丢弃 当前分支 重新拉取

1. git abandon branchName;

2. repo forall -c 'git reset HEAD --hard'
repo forall -c 'git clean -df'
repo sync -c -j8

解决方式二:

这种情况一般创建 当前本地分支时,没有追踪远程分支。使本地分支追踪远程分支即可。

git brach -u 远程分支 本地分支

或者 git branch --set-upstream-to=远程分支 本地分支
posted @ 2022-11-11 15:35  YueQAQ  阅读(289)  评论(0编辑  收藏  举报