Git gc using excessive memory, unable to complete Git gc using excessive memory, unable to complete git git

Git gc using excessive memory, unable to complete


I had the same problem, tried the solutions mentioned so far without success. But my problems with git gc began after I added big image files to repo, so I created .gitattributes file and turned off delta compression for those big files:

*.tga -delta*.psd -delta

It worked.


You might have more luck running a native Windows client such as msysGit, rather than trying to do it inside Cygwin.


Some other config options that you might want to try restricting to lower than default values include:

  • pack.packSizeLimit
  • core.packedGitWindowSize
  • core.packedGitLimit

... all of which are documented in the git config documentation. It's particularly worth checking in each case what units are understood, which I've made mistakes with in the past.