Last active
August 29, 2015 14:18
-
-
Save jasonferrier/91f37a0f22b30ab6d0e2 to your computer and use it in GitHub Desktop.
This bash script will inform you any changes in subdirectories that are git repositories
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 | |
# This bash script will inform you any changes in subdirectories that are git repositories | |
# todo: trim "/.git" from the output of line 13 | |
for dir in ~/Projects/*/.git | |
do ( | |
cd $dir/.. | |
if [[ -n $(git status -s) ]]; then | |
#echo "there are files" | |
echo -e "\033[0;35m$dir \033[0;33m[$(git rev-parse --abbrev-ref HEAD)]\033[0m" | |
echo -e "\033[1;32m\tCHANGES\033[0m" | |
#git status -s | |
echo "" | |
fi | |
) | |
done |
Author
jasonferrier
commented
Apr 7, 2015
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment