Last active
March 24, 2021 06:28
-
-
Save minus34/f20791ce979956ebb8ddbaf005538f8e to your computer and use it in GitHub Desktop.
Update all GitHub repositories and checkout master branches
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
#!/usr/bin/env bash | |
cd ~/git/minus34 | |
for d in */ ; do | |
echo "################################" | |
echo "# $d #" | |
echo "################################" | |
cd ./$d | |
git checkout master | |
git checkout main # lazy way of covering both | |
git fetch --all | |
git merge | |
cd .. | |
done | |
cd ~/git/iag_geo | |
for d in */ ; do | |
echo "################################" | |
echo "# $d #" | |
echo "################################" | |
cd ./$d | |
git checkout master | |
git checkout main # lazy way of covering both | |
git fetch --all | |
git merge | |
cd .. | |
done | |
cd ~/git |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment