Created
July 19, 2020 11:03
-
-
Save MarkWarneke/3600ce7bfadbf67d0af2012427103baa to your computer and use it in GitHub Desktop.
A quick and dirty folder based script to get the status and local branches of all repositories in the current folder
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
#!/bin/bash | |
BASEDIR=$(sh -c pwd) | |
for foldername in */; do \ | |
cd $foldername && \ | |
branch=$(git rev-parse --abbrev-ref HEAD) && \ | |
lbranches=$(git branch) | |
echo "======= Status for $foldername --- branch: $branch =======" && \ | |
git status | |
echo "------- local branches --------" && \ | |
echo "$lbranches" | |
echo "" | |
cd $BASEDIR | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment