今天遇到了git 提交时的一个报错: cannot check the working tree for unmerged files because of an error.unknown index entry for a 0x730000000
也可扩展成Git fatal: Unknown index entry format xxxxx 的错误解决方法
经查询应该是git目录下的index文件损坏
场景:全局替换某个字符串时误修改了 git 下的 index 索引文件,导致提交时报错:fatal: 未知的索引条目格式
解决方法:索引损坏时,通常可以删除索引文件并将其重置
rm -f .git/index
-f 可能有歧义,去掉也行
git reset
注意优先重启下IDE是否已解决问题