Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
A script to garbage collect all git directories inside the corrent directory. i.e. clean up your workspace.
#!/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