当我执行 git svn rebase 命令时,它在某个点停止并显示:
Index mismatch: SHA key of a tree != SHA key of another tree.
(我了解到这些 SHA 键对应的是树而不是提交,可以通过 git show 命令查看上述两个 SHA 键的信息。)
re-reading <sha index of a commit in svn/trunk>
... list of files ...
fatal: bad object <SHA1 index of the bad object>
rev-list -1 <SHA1 index of the bad object> --not <SHA1 index of the revision it was trying to re-read>: command returned error: 128
我对Git的内部运作并不熟悉,是否有一系列步骤可供遵循,以分析和可能解决此类问题?
git fsck
操作。 - Greg Hewgillgit add
时,会创建“悬挂提交”和“悬挂树” - 索引维护为一棵树。 - Andrew Aylett