Skip to content

Instantly share code, notes, and snippets.

@rlorenzo
Created July 3, 2023 01:13
Show Gist options
  • Save rlorenzo/3874f3b6dcf4d81b02a849bc32a5f60b to your computer and use it in GitHub Desktop.
Save rlorenzo/3874f3b6dcf4d81b02a849bc32a5f60b to your computer and use it in GitHub Desktop.
Git cleanup
du -sh .git
git remote prune origin && git repack && git prune-packed && git reflog expire --expire=1.month.ago && git gc --aggressive
du -sh .git
From https://gitbetter.substack.com/p/how-to-clean-up-the-git-repo-and
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment