昨天晚上我在写一个提交消息时遇到了电源故障.当我启动机器备份时,我无法完成提交.我跑了git reset,添加了更改的文件,然后再次尝试,并得到了这个:
% git commit
error: inflate: data stream error (incorrect header check)
error: unable to unpack a94406345ac44982b00cf57b4b9660a35436637f header
fatal: a94406345ac44982b00cf57b4b9660a35436637f is not a valid object
Run Code Online (Sandbox Code Playgroud)
git fsck 揭示以下内容:
% git fsck --full
Checking object directories: 100% (256/256), done.
error: inflate: data stream error (incorrect header check)
error: unable to unpack 4346883490a0990e68db0187241abc1642765a73 header
error: inflate: data stream error (incorrect header check)
fatal: loose object 4346883490a0990e68db0187241abc1642765a73 (stored in .git/objects/43/46883490a0990e68db0187241abc1642765a73) is corrupt
Run Code Online (Sandbox Code Playgroud)
我注意到消息抱怨不同的对象.
我搜索了SO和网络并尝试了一些不同的东西,但无济于事.
git stash给出了相同的信息 …