Skip to content

Instantly share code, notes, and snippets.

@apux
Last active October 7, 2017 06:29
Show Gist options
  • Save apux/3724738 to your computer and use it in GitHub Desktop.
Save apux/3724738 to your computer and use it in GitHub Desktop.
Update multiple git repositories
#!/bin/sh
dirs=`ls -1d */`
for d in $dirs
do
echo $d
echo '======================'
IFS=$'\n' lines=($(cd $d; git pull))
for l in $lines
do
echo $l
done
echo
echo '------------------------------------------------'
echo
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment