Skip to content

Instantly share code, notes, and snippets.

@cbuchler
Created March 28, 2017 14:12
Show Gist options
  • Save cbuchler/cf3061e2ccca1dfb09d259e46baa4174 to your computer and use it in GitHub Desktop.
Save cbuchler/cf3061e2ccca1dfb09d259e46baa4174 to your computer and use it in GitHub Desktop.
Pull all repositories in a given folder
function pull_all(){
for dir in *; do
if [ -d "$dir/.git" ]; then
echo '------------------'
echo $dir
echo '------------------'
(cd $dir && git pull)
echo ' '
fi;
done
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment