Skip to content

Instantly share code, notes, and snippets.

@Soraph
Created November 16, 2022 14:36
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 Soraph/98c88c0b7a2eb65ad0e9048ad060ced5 to your computer and use it in GitHub Desktop.
Save Soraph/98c88c0b7a2eb65ad0e9048ad060ced5 to your computer and use it in GitHub Desktop.
Repo maintenance, be sure to not have things in stash
git fetch --prune
git branch -vv | grep -i 'gone' | awk '{print $1}' | xargs git branch -D
git fsck --full
git reflog expire --expire=now --all
git repack -a -d -l
git gc --prune=now --aggressive
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment