Skip to content

Instantly share code, notes, and snippets.

@senechaux
Created October 3, 2018 14:04
Embed
What would you like to do?
Git pull all subdirectories in current directory
#!/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