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".