I have a mirror cloned repository on which I wanted to try git gc.
When I check the disk usage before and after using git gc, it actually increase the usage.
Will there be any case in which it actually increases the usage?
I have a mirror cloned repository on which I wanted to try git gc.
When I check the disk usage before and after using git gc, it actually increase the usage.
Will there be any case in which it actually increases the usage?
Copyright © 2021 Jogjafile Inc.

Run
git count-objects -vbefore and aftergit gc. Most likely you will observe that there are more loose objects after thegcthan before. The reason is that unreferenced objects are expunged from the object packs and made loose objects. This way, they gain another 2 weeks of lease of life. This is a safety measure in case that there are concurrent operations on the repository elsewhere. If you are certain that there are no other potential users of the objects, you can prune them right away using