I have a 4 years old git repository that starts to become really huge: ~30GO, 60.000 files. One or two commit are done each day. I would like to squash every commits older than 1 year into the first commit. But because of technical issues, I can't just recreate the repo, I have to work with it. The git version available is 1.7.2.5 (not possible to update). The disk space is limited to 100go (so only 70go are still available) and the device memory is 4go (19mo of swap, yes MO...), not possible to move the repo on another computer either.
I tried the selected solution on this page Squash the first two commits in Git?, the February 2009 version. It works until the 'git rebase --onto'. The git-rebase causes a OutOfMemory error, I am not sure of the cause, I think it's maybe because it tries to play every commits in a single shot. I am thinking to use git-cherry-pick and playing each commit one at a time, then move master at the top of it.
Is it a good idea? or anyone has a better idea ? thks! :)