Created
May 17, 2015 18:13
-
-
Save adrianwebb/70a798ec8d44edc3fdec to your computer and use it in GitHub Desktop.
Check all Git repositories on and under current directory for uncommitted changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
curr_dir=`pwd` | |
for dir in $(find $curr_dir -type d) | |
do | |
if [ -d "${dir}/.git" ] | |
then | |
echo "Checking Git repo: ${dir}" | |
cd $dir | |
if [ -z "`git status | grep 'nothing to commit'`" ] | |
then | |
echo "`git status`" | |
fi | |
fi | |
done | |
cd $curr_dir |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment