Skip to content

Instantly share code, notes, and snippets.

@c9s
Created March 31, 2009 17:49
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save c9s/88300 to your computer and use it in GitHub Desktop.
Save c9s/88300 to your computer and use it in GitHub Desktop.
#!/bin/bash
ls -1F | grep '/$' | while read dir ; do
echo "--------Processing $dir"
cd $dir
if [ -d '.git' ] ; then
git gc
else
echo "These is no .git directory"
fi
cd ..
echo "--------Done"
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment