Skip to content

Instantly share code, notes, and snippets.

@versedi
Last active Apr 19, 2016
Embed
What would you like to do?
Show branches for all subdirectories repos in current directory
#!/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