GC prune and git reflog expire scope and related config
We use deferred integration branches which are then preempted and then deleted and recreated. However, the discarded branches leave dangling commits and trees that I can view with this command:git fsck --unreachable --no-reflogs
I could clear them with
git reflog expire --expire-unreachable=now --all
git gc --prune=now
or something similar, but I want to first understand the scope of these commands and the corresponding configuration.
So, specific questions:
- To keep the new clones lean, how can I
gc
trim and flush the lists, not just locally, but also in a remote repository hosted on GitHub? - Can I install the related items git configuration (eg,
gc.pruneexpire
,gc.reflogexpire
,gc.reflogexpireunreachable
) to accommodate the repository GitHub?
PS: See here for useful context: Git listing and deletion ends up with no branch (dangling?)
+2
source to share
No one has answered this question yet
See similar questions:
or similar: