Skip to content

Instantly share code, notes, and snippets.

@lesleh
Created June 5, 2015 14:36
Show Gist options
  • Save lesleh/0b87de42d939737d11c9 to your computer and use it in GitHub Desktop.
Save lesleh/0b87de42d939737d11c9 to your computer and use it in GitHub Desktop.
Recursively list git status for all sub projects
#!/bin/bash
DIR=$(dirname $(readlink -f $0))
find $DIR -maxdepth 2 -mindepth 2 -name .git -type d | while read REPO; do
REPO=${REPO//.git/}
echo $REPO
pushd $REPO >/dev/null
git status -s
popd >/dev/null
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment