Last active
April 19, 2016 06:27
-
-
Save versedi/ac41ba6e152984f6fc2fcaaac7e2e7af to your computer and use it in GitHub Desktop.
Show branches for all subdirectories repos in current directory
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 | |
for D in *; do | |
if [ -d "${D}" ]; then | |
if [ -d "${D}/.git" ]; then | |
echo | |
echo -------------- | |
echo | |
echo -e "\033[1m${D}\033[0m" | |
echo | |
cd ${D} && git branch \ && cd ../ | |
fi | |
fi | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment