I have a large repository (Android OS instance) and I was trying to reduce the .git folder size (currently at 76G), since the build is running out of space.
I tried running the git gc --prune=now --aggressive from here but it failed with the following error:
git gc --prune=now --aggressive
Enumerating objects: 998206, done.
Counting objects: 100% (998206/998206), done.
Delta compression using up to 16 threads
error: pack-objects died of signal 98506)
fatal: failed to run repack
the repo has branches from two remotes if this makes any difference.
How can I avoid/fix this error?
Thanks!
EDIT: I've tried running the git gc --prune=now without the aggressive option and the operation ran sucessfully, reducting my .git folder to 27GB.
Signal number 9 is
SIGKILL. This is an un-catch-able signal that causes a process to terminate immediately. A lot of modern Unix-like systems use this signal as part of the "OOM killer" (Out Of Memory Killer) that kicks in when you're using too much RAM and/or swap space.The solutions include:
For more details, see this closely-related (though not identical) question.