Skip to content

Instantly share code, notes, and snippets.

@SRombauts
Last active February 22, 2019 10:52
Show Gist options
  • Star 7 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save SRombauts/0cc92cb301669004d1d2 to your computer and use it in GitHub Desktop.
Save SRombauts/0cc92cb301669004d1d2 to your computer and use it in GitHub Desktop.
git-optimize
#!/bin/sh
du -sh .git
git reflog expire --expire=now --all
git gc --prune=now
git gc --aggressive --prune=now
du -sh .git
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment