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