2

I'm trying to run git gc on a repo but it fails because it run out of memory at the delta compression phase. I assume it's because some object are too big. Is there a way to avoid this memory problem (or disable the compression) ?

mb14
  • 22,276
  • 7
  • 60
  • 102
  • Does `git gc --aggressive` change anything? And after `git config core.deltaBaseCacheLimit 96m`? (as in http://stackoverflow.com/a/24978239/6309) – VonC Jan 01 '15 at 17:50

1 Answers1

2

You can test the settings of "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

Followed by:

git gc --aggressive

Check also, if you have a Git2.0+ (so not a git for Windows, limited to 1.9.5), my answer:

git gc --aggressive --depth=x

(try different values from the default 250 one)

Update May 2017: Git 2.13.x/2.14 (Q3 2017) will increase core.packedGitLimit considerable (up to 32 GiB!).
See "fatal: early EOF fatal: index-pack failed".

Community
  • 1
  • 1
VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250
  • I'm stuck with git 1.7.2.5. Anyway, the first solution took forevere but worked ! Thx – mb14 Jan 01 '15 at 18:57