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
git github git-reflog


source to share


No one has answered this question yet

See similar questions:

3
Click on origin after reflog and gc prune expired

or similar:

1432
How can I reconcile a separate head with a master / source?
1258
Throwing local commits in Git
879
Git workflow and rebase vs merge questions
854
Git for Beginners: The Ultimate Practical Guide
818
How to reinstall local branch with remote master
468
Various Ways to Remove Local Git Changes
442
Git checkout: update paths are incompatible with commutation branches
400
Remove local git tags that are no longer in the remote repository.
379
How can I postpone a github repository to a specific commit?
3
Click on origin after reflog and gc prune expired



All Articles
Loading...
X
Show
Funny
Dev
Pics