Created
December 24, 2020 13:20
-
-
Save adomingues/e557aae2bcd27e455e5e3c3a66b29116 to your computer and use it in GitHub Desktop.
crawl all sub-directories wich are git repos and list those with more than one branch
This file contains hidden or 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
parent=$(pwd) | |
for repo in $(find ${parent} -maxdepth 2 -name ".git" -type d | sed 's/.git//'); do | |
cd ${repo} | |
n=$(git branch | wc -l) | |
if [[ ${n} -gt 1 ]]; then | |
echo ${repo} | |
fi | |
cd ${parent} | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment