Created
August 30, 2018 04:21
-
-
Save aidin36/43e22ea12650c9c7125959c4e2399ce8 to your computer and use it in GitHub Desktop.
A script to garbage collect all git directories inside the corrent directory. i.e. clean up your workspace.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/zsh | |
set -e | |
CURRENT_PATH=`pwd` | |
for p in `find . -name .git -print`; do cd $(dirname $p);git gc;cd $CURRENT_PATH; done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment