This error has been bothering me for quite a long time now (several months), and everything I could find (either here on SO or on the Internet) has been solving nothing.
I have a git repository with a big history. So big that it's impossible to clone it. This is not what I want to address here, but specifying it might help you understand the problem.
Using git version 1.9.5, every time I git pull
, git tells me: "Auto packing the repository for optimum performance. You may also
run "git gc" manually. See "git help gc" for more information.". But it fails with this error: "fatal: Out of memory, malloc failed (tried to allocate 257539286 bytes)" (with the number of bytes increasing on every pull). I tried several times to run git gc
manually, even with --prune=now
, but I've been getting the same error.
Is there any configuration I can use to be able to git gc
successfully? I don't mind if it takes several days to complete. (As said before, deleting the repo and cloning it back is not an option, since a clone leads to a timeout error from the proxy.)