执行repo sync -j8的时候,遇到代码同步错误
error: frameworks/base/: prior sync failed; rebase still in progress
error: Cannot checkout platform/frameworks/base
fatal: Unable to create .git/index.lock File exists.
使用命令无法修复
repo sync -j1 --fail-fast
参考网上删除无法解决
rm frameworks/base/.git/index.lock
最终的解决方法,去出错的目录下,git am --abort:
:/mnt/fileroot/tmp/frameworks/base$ git status .
HEAD detached at 1d9b9ab57d84
You are in the middle of an am session.
(fix conflicts and then run "git am --continue")
(use "git am --skip" to skip this patch)
(use "git am --abort" to restore the original branch)
nothing to commit, working tree clean
:/mnt/fileroot/tmp/frameworks/base$ git am --abort