Skip to content

Instantly share code, notes, and snippets.

@philippeowagner
Created August 10, 2015 11:13
Show Gist options
  • Select an option

  • Save philippeowagner/0410906a52751d65bebe to your computer and use it in GitHub Desktop.

Select an option

Save philippeowagner/0410906a52751d65bebe to your computer and use it in GitHub Desktop.
Running ``git gc`` in each and every repository located in my workspace.
#!/bin/sh
WORKSPACE="/Users/phi/workspace"
for f in $WORKSPACE/*; do
if [[ -d $f ]]; then
echo "Processing " $f
cd $f
git gc
echo "================="
fi
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment