使用git时报错 error: xxxxx is empty

今天使用git提交代码时出现了一个错误,error: object file .git/objects/xxxxxxxxx is empty

由于从没碰到过,在网上遨游十几分钟,终于解决了,贴链接: https://blog.csdn.net/10km/article/details/83240177

在此记录,万一哪天又遇到,自己还能翻出来看看,总的来说三句代码:

find .git/objects/ -type f -empty | xargs rm

git fetch -p

git fsck --full

解决

事情很多,没空细究,以后再研究是什么原因!!

猜你喜欢

转载自www.cnblogs.com/Test-Log/p/12933825.html