Skip to content

Instantly share code, notes, and snippets.

@xbalaji
Last active September 16, 2018 19:55
Show Gist options
  • Save xbalaji/ac4e0653a8a1c0c6b23ccf281dc07b08 to your computer and use it in GitHub Desktop.
Save xbalaji/ac4e0653a8a1c0c6b23ccf281dc07b08 to your computer and use it in GitHub Desktop.
clean up git folder
# see: https://stackoverflow.com/questions/5613345/how-to-shrink-the-git-folder
# good and safe command - from http://gcc.gnu.org/ml/gcc/2007-12/msg00165.html
git repack -a -d --depth=250 --window=250
# default options should be enough for most cases, see: https://git-scm.com/docs/git-repack
git repack -a -d
# agressive way
# git gc --aggressive --prune
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment