I can't clean up a git repo. If I try to, I get this error message:
$ git gc Counting objects: 8828, done. fatal: Cannot handle files this big error: failed to run repack
If I google it, there are literally only 2 results: This question and the error message as a pastebin entry which was submitted 2 minutes after I first posted this question here. So no one else seems to have the problem.
Granted, there is a 4.8 GB file tracked with git and git takes about 8 to 9 GiB of virtual ram on my laptop when running
git gc, and my raspi only has 1 GB of physical ram. However, it usually has a 1 GiB swap and I just added a 30 GiB swap to do this operation. So it should have enough ram.
Unfortunately, the error message doesn't contain the reason why the cleanup command can't handle files that big. So I don't know what the limiting property of my system is.
What is the problem and is it possible to do the cleanup on the raspberry pi? (Transferring it to a desktop computer doesn't seem like a good solution to me.)
I actually planned on cleaning up some way bigger repos using my raspi because it runs anyways and this way I might not need to have my computer run for hours.
I thought that maybe cloning the repo will yield a cleaned-up repo. However, I get this output:
$ git clone ../Documents Cloning into 'Documents'... done. fatal: Cannot handle files this big warning: Clone succeeded, but checkout failed. You can inspect what was checked out with 'git status' and retry the checkout with 'git checkout -f HEAD'
--bare to the clone command returns instantly with no error. (Probably some ext4 magic going on so the files are copied on-write.) Needless to say, no cleaning was going on. But this might contain a clue, so I let you know about it.