Created
October 3, 2018 14:04
-
-
Save senechaux/632790cbdc6c4d95fd30464a90f8e699 to your computer and use it in GitHub Desktop.
Git pull all subdirectories in current directory
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
#!/bin/bash | |
DIRS=`ls -d */` | |
for dir in ${DIRS[@]}; do | |
cd $dir | |
if [ -d .git ]; then | |
echo '==================' | |
echo '==================' | |
echo $dir | |
echo '==================' | |
echo '==================' | |
git co master | |
git pull | |
git co - | |
git co dev | |
git pull | |
git co - | |
fi; | |
cd .. | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment