Git gc using excessive memory, unable to complete

别来无恙 提交于 2019-11-28 06:45:26

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

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.

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.

The only thing that help to avoid this error on shared Linux hosting was to add

  [pack]
    packSizeLimit = 64m
    threads = 1

to

.gitconfig

Most important was "threads = 1"

Maybe temporarily adding a swap file bigger than life and going for a few cups of coffee elsewhere will help?

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!