After using git gc
and git repack
(with various options) I still have 4825 loose commits in the folder .git/objects
. I would like to have all of them in the pack file with the rest or in another pack file.
I'm doing lots commit rewriting (amend + rebase) hence it's perfectly normal to have many unreachable commits. My .gitconfig contains these parameters to keep reflogs and unreachable commits for a long time.
[gc]
reflogExpire = 300 days
reflogExpireUnreachable = 200 days
pruneExpire = 90 days
You may wonder if it make sense but I already needed and have recovered a few commits made several months ago. It happens we develop for many months on a new set of higher priority branches and afterwards continue on the older lower priority branches.
The main reason for this question is that git gui
keeps on complaining to compress my database despites I have done this many times.
If we are not able to pack those loose commits then this "complaining" might be a bug in git gui
.