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.