Windows – Downloading big Git repos on Windows without getting “out of memory”

gitwindows

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?

Best Answer

I think, it's not Windows-Git problem, but malformed repo, because

aborting due to possible repository corruption on the remote side

Yes, it's common problem for 32bit Windows and big files: (closed) ticket for msysgit and Git on Windows, “Out of memory - malloc failed” topic here.

Solution - x64, smaller files or fine-tune git config

Related Question