git出现empty object时的恢复方法
/ / 点击 / 阅读耗时 1 分钟在git commit
时,终端出现报错:
1
2 error: object file .git/objects/31/65329bb680e30595f242b7c4d8406ca63eeab0 is empty
fatal: loose object 3165329bb680e30595f242b7c4d8406ca63eeab0 (stored in .git/objects/31/65329bb680e30595f242b7c4d8406ca63eeab0) is corrupt查询,定位原因是虚拟机崩溃导致的
.git
目录下文件的损坏。
解决方法如下:
https://stackoverflow.com/questions/11706215/how-to-fix-git-error-object-file-is-empty
感谢阅读!欢迎评论嗷~