Skip to content

Instantly share code, notes, and snippets.

@scrobbleme
Last active December 18, 2015 22:39
Show Gist options
  • Save scrobbleme/5856478 to your computer and use it in GitHub Desktop.
Save scrobbleme/5856478 to your computer and use it in GitHub Desktop.
A script you can use on your CI to make a regularly "git gc"for i in `find ${WORKSPACE}/../../*/workspace -type d -maxdepth 1`; do if [ -d "$i/.git" ]; then cd $i git gc fi done
for i in `find ${WORKSPACE}/../../*/workspace -type d -maxdepth 1`; do
if [ -d "$i/.git" ]; then
cd $i
git gc
fi
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment