View git-optimize.sh
#!/bin/sh | |
du -sh .git | |
git reflog expire --expire=now --all | |
git gc --prune=now | |
git gc --aggressive --prune=now | |
du -sh .git |