When I try downloading or cloning a large Git repo I keep getting an "out of memory" error like so:
error: git upload-pack: git-pack-objects died with error. fatal: git upload-pack: aborting due to possible repository corruption on the remote side. remote: warning: suboptimal pack - out of memory[K remote: fatal: Out of memory, malloc failed (tried to allocate 230789474 bytes)[K remote: aborting due to possible repository corruption on the remote side. fatal: protocol error: bad pack header
I am using the Git GUI provided with the Git client from the Git website. The Cygwin version has the same problem.
How do I fix this?