Created
October 4, 2015 20:49
-
-
Save sebble/5aa46834a9293407dfe2 to your computer and use it in GitHub Desktop.
Check for changes in all git repos on system
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 | |
sudo updatedb | |
for git in `locate -b --regex '^.git$'`; do | |
cd $git/..; | |
if git status 2>/dev/null|grep -E '(Untracked|Changes|ahead)'>/dev/null; then | |
echo Changes in $git; | |
else | |
echo None in $git; | |
fi; | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment