How to deal with git file damage caused by sudden shutdown

Administrator@wangxinqiang-PC MINGW32 /d/juejinqifu (develop)
$ git status
On branch develop
error: inflate: data stream error (unknown compression method)
error: unable to unpack e77ede4f4eb99996e9312a9e8f231d1fc3558db0 header
error: inflate: data stream error (unknown compression method)
fatal: loose object e77ede4f4eb99996e9312a9e8f231d1fc3558db0 (stored in .git/objects/e7/7ede4f4eb99996e9312a9e8f231d1fc3558db0) is corrupt

Administrator@wangxinqiang-PC MINGW32 /d/juejinqifu (develop)
$ git show 831a5d31af4a0af2f5a367689bee27a44efc22c9 > 831a5-file^C

Administrator@wangxinqiang-PC MINGW32 /d/juejinqifu (develop)
$ git show e77ede4f4eb99996e9312a9e8f231d1fc3558db0 > 831a5-file
error: inflate: data stream error (unknown compression method)
error: unable to unpack e77ede4f4eb99996e9312a9e8f231d1fc3558db0 header
error: inflate: data stream error (unknown compression method)
fatal: loose object e77ede4f4eb99996e9312a9e8f231d1fc3558db0 (stored in .git/objects/e7/7ede4f4eb99996e9312a9e8f231d1fc3558db0) is corrupt

Administrator@wangxinqiang-PC MINGW32 /d/juejinqifu (develop)
$ ls .git/objects/e7/7ede4f4eb99996e9312a9e8f231d1fc3558db0
.git/objects/e7/7ede4f4eb99996e9312a9e8f231d1fc3558db0

Administrator@wangxinqiang-PC MINGW32 /d/juejinqifu (develop)
$ rm -rf .git/objects/e7/7ede4f4eb99996e9312a9e8f231d1fc3558db0

Administrator@wangxinqiang-PC MINGW32 /d/juejinqifu (develop)

Similar Posts: