Created
May 7, 2024 22:22
-
-
Save EdoardoVignati/6078922ee29e26813034ffe935be2800 to your computer and use it in GitHub Desktop.
Track all the Git branches of all repositories
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
for folder in $(ls -d */); do | |
cd $folder | |
echo | |
echo =========================== | |
echo $folder | |
echo =========================== | |
for branch in $(git branch -r | grep -v HEAD | cut -d / -f 2,3,4,5); do | |
echo | |
echo "=>" $branch | |
git checkout $branch | |
git checkout . | |
git pull --rebase | |
done | |
cd .. | |
echo | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment