repo reset: error: entry 'comand.py ’ not uptodate . cannot merge
引言
又有好久没有写点偏重实战类型的博客了,最近一直都在捣鼓源码分析和项目相关事情,是时候来点偏重实战类型的博客了。捯饬点啥实战的呢,这不吃着火锅,唱着歌,正准备下载下AOSP的源码来玩一玩,可是当我切换到一台新的服务器上第一次正准备repo sync下载AOSP源码的时候,怎么也不成功,一直提示如下错误:
Fetching: 100% (784/784), done in 7m16.864s
Garbage collecting: 100% (784/784), done in 3.200s
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 'command.py' not uptodate. Cannot merge.
fatal: 不能重置索引文件至版本 'v2.17.3^0'。
注意,这里发生这个问题通常是在进行APSP第一次下载的时候!
一.怎么解决
由于这是一篇实战类型的博客,所以废话不多说,直接上解决办法,其最最核心的逻辑是需要更新.repo内的repo版本,具体执行如下:
cd .repo/repo
git pull
cd ../../
repo sync
XXX@dell-PowerEdge-R740xd:~/android_source/aosp$ cd .repo/repo/
XXX@dell-PowerEdge-R740xd:~/android_source/aosp/.repo/repo$ git pull
remote: Enumerating objects: 10, done.
remote: Counting objects: 100% (10/10), done.
remote: Compressing objects: 100% (8/8), done.
remote: Total 10 (delta 3), reused 9 (delta 2)
展开对象中: 100% (10/10), 18.45 KiB | 22.00 KiB/s, 完成.
来自 https://mirrors.tuna.tsinghua.edu.cn/git/git-repo
e660106..fdeb20f main -> origin/main
更新 784e16f..11b30b9
Fast-forward
command.py | 10 +-
completion.bash | 67 ++++++++---
docs/internal-fs-layout.md | 6 +
docs/manifest-format.md | 34 ++++--
docs/release-process.md | 164 +++++++++++++++++---------
fetch.py | 45 +++++++
git_command.py | 3 +-
git_config.py | 120 +++++++++++++++++--
git_superproject.py | 191 ++++++++++++++++++++----------
git_trace2_event_log.py | 38 +++++-
main.py | 73 +++++++-----
man/repo-abandon.1 | 36 ++++++
man/repo-branch.1 | 1 +
man/repo-branches.1 | 59 ++++++++++
man/repo-checkout.1 | 36 ++++++
man/repo-cherry-pick.1 | 28 +++++
man/repo-diff.1 | 35 ++++++
man/repo-diffmanifests.1 | 61 ++++++++++
man/repo-download.1 | 44 +++++++
man/repo-forall.1 | 128 ++++++++++++++++++++
man/repo-gitc-delete.1 | 31 +++++
man/repo-gitc-init.1 | 150 ++++++++++++++++++++++++
man/repo-grep.1 | 119 +++++++++++++++++++
man/repo-help.1 | 33 ++++++
man/repo-info.1 | 40 +++++++
man/repo-init.1 | 170 +++++++++++++++++++++++++++
man/repo-list.1 | 61 ++++++++++
man/repo-manifest.1 | 548 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
man/repo-overview.1 | 39 +++++++
man/repo-prune.1 | 28 +++++
man/repo-rebase.1 | 55 +++++++++
man/repo-selfupdate.1 | 35 ++++++
man/repo-smartsync.1 | 118 +++++++++++++++++++
man/repo-stage.1 | 30 +++++
man/repo-start.1 | 41 +++++++
man/repo-status.1 | 98 ++++++++++++++++
man/repo-sync.1 | 209 +++++++++++++++++++++++++++++++++
man/repo-upload.1 | 175 ++++++++++++++++++++++++++++
man/repo-version.1 | 24 ++++
man/repo.1 | 133 +++++++++++++++++++++
manifest_xml.py | 135 ++++++++++++++-------
platform_utils.py | 33 +++---
project.py | 103 +++++++++-------
release/sign-launcher.py | 35 ++++--
release/update-manpages | 102 ++++++++++++++++
repo | 6 +-
ssh.py | 3 +
subcmds/help.py | 7 ++
subcmds/init.py | 98 +++++++++++++---
subcmds/list.py | 16 ++-
subcmds/manifest.py | 5 +
subcmds/sync.py | 118 +++++++++++--------
tests/test_git_config.py | 19 +++
tests/test_git_superproject.py | 63 ++++++++--
tests/test_git_trace2_event_log.py | 48 +++++++-
tests/test_manifest_xml.py | 209 ++++++++++++++++++++++++++++++++-
tests/test_platform_utils.py | 50 ++++++++
57 files changed, 3996 insertions(+), 370 deletions(-)
create mode 100644 fetch.py
create mode 100644 man/repo-abandon.1
create mode 100644 man/repo-branch.1
create mode 100644 man/repo-branches.1
create mode 100644 man/repo-checkout.1
create mode 100644 man/repo-cherry-pick.1
create mode 100644 man/repo-diff.1
create mode 100644 man/repo-diffmanifests.1
create mode 100644 man/repo-download.1
create mode 100644 man/repo-forall.1
create mode 100644 man/repo-gitc-delete.1
create mode 100644 man/repo-gitc-init.1
create mode 100644 man/repo-grep.1
create mode 100644 man/repo-help.1
create mode 100644 man/repo-info.1
create mode 100644 man/repo-init.1
create mode 100644 man/repo-list.1
create mode 100644 man/repo-manifest.1
create mode 100644 man/repo-overview.1
create mode 100644 man/repo-prune.1
create mode 100644 man/repo-rebase.1
create mode 100644 man/repo-selfupdate.1
create mode 100644 man/repo-smartsync.1
create mode 100644 man/repo-stage.1
create mode 100644 man/repo-start.1
create mode 100644 man/repo-status.1
create mode 100644 man/repo-sync.1
create mode 100644 man/repo-upload.1
create mode 100644 man/repo-version.1
create mode 100644 man/repo.1
create mode 100755 release/update-manpages
create mode 100644 tests/test_platform_utils.py
好了,至此完美收工!打卡下班。错了,打卡结束本篇!
写在最后
好了今天的博客repo sync repo reset: error: entry 'comand.py ’ not uptodate . cannot merge就到这里了。总之,青山不改绿水长流先到这里了。如果本博客对你有所帮助,麻烦关注或者点个赞,如果觉得很烂也可以踩一脚!谢谢各位了!!