Skip to content

Instantly share code, notes, and snippets.

@motlin
Created June 12, 2022 11:27
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save motlin/8c9de19db139c15f189f3a017fa676e5 to your computer and use it in GitHub Desktop.
Save motlin/8c9de19db139c15f189f3a017fa676e5 to your computer and use it in GitHub Desktop.
# https://stackoverflow.com/a/2116892
git reflog expire --all --expire=now
git gc --prune=now --aggressive
# https://stackoverflow.com/a/14729486
git -c gc.reflogExpire=0 -c gc.reflogExpireUnreachable=0 \
-c gc.rerereresolved=0 -c gc.rerereunresolved=0 \
-c gc.pruneExpire=now gc --aggressive --prune=now
# https://github.com/GitAlias/gitalias/blob/main/doc/git-optimizer/index.md
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment