Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save wellington1993/40b4a2b666c511863112f596e8754df4 to your computer and use it in GitHub Desktop.
Save wellington1993/40b4a2b666c511863112f596e8754df4 to your computer and use it in GitHub Desktop.
Aggressively compact a git repository
git fsck --unreachable
git reflog expire --expire=0 --all
git repack -a -d -l
git prune
git gc --aggressive
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment