My dotfiles. Period.

123456789101112131415161718
  1. #!/bin/bash
  2. #
  3. # Perform extra aggressive garbage collection
  4. #
  5. XTRAGC_REFDIR=.
  6. test -d ".git" && XTRAGC_REFDIR=".git"
  7. du -hs "$XTRAGC_REFDIR"
  8. git \
  9. -c gc.reflogExpire=0 \
  10. -c gc.reflogExpireUnreachable=0 \
  11. -c gc.rerereresolved=0 \
  12. -c gc.rerereunresolved=0 \
  13. -c gc.pruneExpire=now \
  14. gc
  15. du -hs "$XTRAGC_REFDIR"