Skip to content

Instantly share code, notes, and snippets.

@fsvehla
Created March 22, 2012 11:44
Show Gist options
  • Save fsvehla/2157859 to your computer and use it in GitHub Desktop.
Save fsvehla/2157859 to your computer and use it in GitHub Desktop.
#!/bin/bash
# For the duration of this script, don’t run .rvmrcs
unset rvm_project_rvmrc
orig_pwd=$PWD
find . -name '*.git' -type d | while read repo; do
# Starts a subshell, and thereby resetting pwd every time
cd "$orig_pwd/$repo"
pwd
du -sch . | tail -n 1 | cut -f 1
git gc --quiet
du -sch .| tail -n 1 | cut -f 1
echo
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment