I've been reading up on git, and I have a very particular question I am struggling to answer.
When does git gc
execute autonomously?
I've been hearing through the grape-vine of various forums that it occurs by default on a push or a fetch/pull - but I cannot find any source that verifies this. Even the documentation itself only gets this specific (emphasis mine):
Some git commands may automatically run git gc; see the --auto flag below for details
and the --auto
flag specifies
Some git commands run git gc --auto after performing operations that could create many loose objects.
I want to be able to deterministically say:
"Loose tree and blob files will not have been cleaned up by git until one of the following commands is run: {mystery list here}. When running one of these commands, if the number of loose objects exceeds the value of gc.auto
, git will automatically compress the objects into a packfile".
Currently those are:
Actual list can be verified by doing a code search.
Also from that you can see that gc on receive can be disabled with receive.autogc
, others just run the gc in the end.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With