123456789101112131415161718 |
- #!/bin/bash
-
- #
- # Perform extra aggressive garbage collection
- #
-
- XTRAGC_REFDIR=.
- test -d ".git" && XTRAGC_REFDIR=".git"
-
- du -hs "$XTRAGC_REFDIR"
- git \
- -c gc.reflogExpire=0 \
- -c gc.reflogExpireUnreachable=0 \
- -c gc.rerereresolved=0 \
- -c gc.rerereunresolved=0 \
- -c gc.pruneExpire=now \
- gc
- du -hs "$XTRAGC_REFDIR"
|