Repack of Git repository fails
Your solution has got you a working copy locally and remotely, but will cause problems again when the remote repository decides to repack itself again. Fortunately, you can set config options that will reduce the amount of memory needed for repacking in both repositories -- these essentially make the command line parameters that you added into the default options when repacking. So, you should log in to the remote, change into the repository and do:
git config pack.windowMemory 10m
git config pack.packSizeLimit 20m
You may want to do the same on your local repository. (Incidentally I guess that either your repository is very large or these are machines with little memory - these values seem very low to me.)
For what it's worth, when getting malloc failures on repacking very large repositories in the past, I've also changed the values of core.packedgitwindowsize
, core.packedgitlimit
, core.deltacachesize
, pack.deltacachesize
, pack.window
and pack.threads
but it sounds as if you don't need any further options :)
With no direct access to repository and hence being unable to perform a repack, performing a shallow clone and then gradually fetching while increasing depth helped for me.
git clone YOUR_REPO --depth=1
git fetch --depth=10
...
git fetch --depth=100
git fetch --unshallow //Downloads all history allowing to push from repo
Hope it can still help someone.