【问题标题】:How to disable to git delta compression when garbage collecting垃圾收集时如何禁用 git delta 压缩
【发布时间】:2015-01-01 17:15:10
【问题描述】:

我正在尝试在存储库上运行git gc,但它失败了,因为它在增量压缩阶段内存不足。我认为这是因为某些物体太大了。有没有办法避免这个内存问题(或禁用压缩)?

【问题讨论】:

标签: git


【解决方案1】:

您可以测试“Stopping a git gc --aggressive, is that a bad thing?”的设置

git config pack.threads 1
git config pack.deltaCacheSize 1
git config core.packedGitWindowSize 16m
git config core.packedGitLimit 128m
git config pack.windowMemory 512m

接着是:

git gc --aggressive

检查一下,如果你有 Git2.0+(所以不是 Windows 的 git,仅限于 1.9.5),my answer

git gc --aggressive --depth=x

(尝试与默认 250 不同的值)

2017 年 5 月更新:Git 2.13.x/2.14(2017 年第三季度)将增加 core.packedGitLimit 相当大(高达 32 GiB!)。
见“fatal: early EOF fatal: index-pack failed”。

【讨论】:

  • 我被 git 1.7.2.5 卡住了。无论如何,第一个解决方案需要永远但有效!谢谢
猜你喜欢
  • 2011-10-15
  • 1970-01-01
  • 2016-01-29
  • 2020-01-21
  • 1970-01-01
  • 1970-01-01
  • 2016-05-19
  • 1970-01-01
  • 2011-06-01
相关资源
最近更新 更多