I'm trying to do a git clone from a bitbucket repo. When doing that this error occurs:
fatal: Out of memory maloc, failed ( try to allocate 1822535087 bytes )
fatal: index-pack failed
fatal: write-error invalid argument
After searching for a problem on stackoverflow ( Repack of Git repository fails ), I ran this command locally and then pushed the changes up to the bitbucket repo.
git repack -a -d --window-memory 10m --max-pack-size 20m
However, when I try to clone the repo on another machine, I still get the "maloc, failed" error.
Also, after running the command:
git repack -a -d --window-memory 10m --max-pack-size 20m
I tried to validate that the pack file, the pack file that is too large, was indeed changed in my local version of the repo. But it is still there and is around 217.263113 mb.
Is there a way to remove this large pack file safely? Is the git repack the wrong tool to use for this problem?