Last active
September 18, 2015 10:08
-
-
Save cgrinaldi/abb812f4e23a4ce97a87 to your computer and use it in GitHub Desktop.
Check the statuses of multiple git repositories within a shared directory structure
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 | |
localPATH=`pwd` # path of current directory | |
sep='---------------' | |
for d in */; do | |
echo $sep"Checking Status of" $d$sep | |
d=`echo $d | sed s#/##` # remove trailing forward slash | |
git -C $localPATH/$d checkout master # checkout master in different directory | |
git -C $localPATH/$d status # run git status | |
echo -e '\n' | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment