整个团队都会收到'太多无法获得的松散对象'消息 [英] Whole team gets 'too many unreachable loose objects' messages

查看:4289
本文介绍了整个团队都会收到'太多无法获得的松散对象'消息的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

不久前,我们已经从SVN切换到Git。

几天前,我意识到我们所有的团队在推送时都会收到这些消息:

  $ git push 
计数对象:32,完成。
使用多达8个线程的增量压缩。
压缩对象:100%(19/19),完成。
写作对象:100%(32/32),2.94 KiB | 0字节/秒,完成。
总计32(增量14),重用0(增量0)
错误:最后一次gc运行报告如下。请更正根本原因
并删除gc.log。
在文件被移除之前不会执行自动清理。

警告:太多不可触及的松散物体;运行'git prune'删除它们。

至git@git.ad.xxx.se:root / xxx.git
15c3bbb..69e6d8b xxxx - > xxx

我以为它是从我的电脑传来一段时间,直到我意识到每个人都有相同的的问题。



不用说,我的.git文件夹中没有gc.log,使用'git gc'或'git prune'没有任何作用。



所以我的问题是:服务器上托管的存储库是不是很干净?如果是这样,我该如何清理它呢?

到目前为止,我发现的所有解决方案都与本地版本库有关。



另外,我们使用Gitlab来托管我们的回购。



编辑:值得一提的是,我发布的这个问题也尝试过使用Gitlab清理存储库,但目前为止没有任何结果。



谢谢 解决方案

然后是 issue 14357

a>(GitLab 8.6-或更少)



手动修正为:


  • SSH进入worker1

  • cd进入gitlab-org / gitlab-ce目录
  • 运行 rm gc.log
  • code>,这只是包含行警告:有太多无法访问的松散对象;运行'git prune'删除它们。
  • git prune 并且祈祷它没有破坏事物(它幸好没有)



但它看起来像,从GitLab 8.7开始, auto gc is disabled

这也是在(仍然打开)issue 13524


,修改或其他需要强制推送的操作,我们可以有悬而未决的提交。

由于 git gc ,可以在内部执行或使用GitLab内务管理功能。



如果发生了与特定提交有关的讨论 - 它不是



提交记录在推送事件中,并且可通过添加到合并请求的系统备注提供,目前这会产生错误500 GitLab。



Not long ago, we have made the switch from SVN to Git.

A few days ago, I realized that all of our team gets those messages when they push :

$ 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

I thought it was coming from my computer for a while, until I realize that everybody has the same issues.

Needless to say, there is no gc.log in my .git folder, and using 'git gc' or 'git prune' has no effect.

So my question is : Could it be that the repository hosted on the server is somehow not clean? If so, how to I actually clean it?

All of the solutions I have found so far relate to local copies of repositories.

Also, we use Gitlab to host our repos.

EDIT : It is worth saying that I have since I posted this question also tried "Housecleaning" the repository using Gitlab but with no result so far.

Thanks

解决方案

This is followed by issue 14357 (GitLab 8.6- or less)

The manual fix was:

  • SSH into worker1
  • cd into the gitlab-org/gitlab-ce directory
  • ran rm gc.log, this just contained the line " warning: There are too many unreachable loose objects; run 'git prune' to remove them."
  • ran git prune and prayed it didn't break things (which it thankfully didn't)

But it looks like, starting GitLab 8.7, auto gc is disabled.
This is also done in the context of (still opened) issue 13524:

Typically after a rebase, amend or other action that requires a force push we can have dangled commits.

Such "dereferenced" commits are getting lost due to git gc that may be executed internally or by using GitLab Housekeeping features.

If it happens that there was a discussion attached to a specific commit - it is not available after dereferenced commit has been garbage-collected.

Commits are being recorded in push events and are available through system notes added to merge request, and currently this produces error 500 in GitLab.

这篇关于整个团队都会收到'太多无法获得的松散对象'消息的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆