Git 错误 Object Is Empy / Corrupt

问题

早上上班开始工作是准备git push到远程服务器时,出现下面错误!我估计是之前的merge导致的

1
2
  error: object file .git/objects/xx/xxx is empty
  fatal: loose object xxx (stored in .git/objects/xx/xxx is corrupt

解决方案

参考链接, 其实我就是删除空的commit就可以了

find .git/objects/ -size 0 -exec rm -f {} \; 

Comments

Copyright © 2017 kaka