git - git整个团队收到'too many unreachable loose objects'消息

不久以前,我从SVN切换到Git。

几天前,所有团队在推送时收到这些消息:


$ git push


Counting objects: 32, done.


Delta compression using up to 8 threads.


Compressing objects: 100% (19/19), done.


Writing objects: 100% (32/32), 2.94 KiB | 0 bytes/s, done.


Total 32 (delta 14), reused 0 (delta 0)


error: The last gc run reported the following. Please correct the root cause


and remove gc.log.


Automatic cleanup will not be performed until the file is removed.



warning: There are too many unreachable loose objects; run 'git prune' to remove them.



To git@git.ad.xxx.se:root/xxx.git


 15c3bbb..69e6d8b xxxx -> xxx



问题是:服务器上托管的存储库是否不干净?如果是的话,我怎么清理它?

谢谢

时间:

手动修复是:

  • SSH到worker1
  • cd到gitlab org gitlab-ce目录中
  • 运行rm gc.log,如果只包含警告,太多无法到达的松散对象;运行git prune'移除它们
  • 运行git prune并祈祷它没有中断
...