回购同步失败,并显示“回购未跟踪远程分支”

问题描述 投票:0回答:3

当我尝试运行存储库同步时,出现此错误:

info: A new version of repo is available warning: repo is not tracking a remote branch, so it will not receive updates repo reset: error: Entry 'git_superproject.py' not uptodate. Cannot merge. fatal: Could not reset index file to revision 'v2.16.7^0'.

我没有进行任何项目或存储库更改。

git android-source repo android-soong
3个回答
3
投票

导航到

.repo/repo/
并运行
git status
。如果有任何改变,如果你不需要它们,你应该运行
git checkout -f
将它们扔掉。


0
投票

完全删除

.repo/repo
目录,下次
repo
运行时,它将再次克隆客户端。


-1
投票

您可以忽略信息部分并查找错误消息

warning: repo is not tracking a remote branch

本地分支与远程分支不同步,可以设置upstream并使用命令更新本地

 git branch --set-upstream-to=<remote>/<branch> <local-branch>
 git fetch upstream
 git rebase upstream/local-branch

对于错误和致命的部分,您可以重置本地分支,忽略本地更改。

git reset --hard
© www.soinside.com 2019 - 2024. All rights reserved.