Skip to content

Instantly share code, notes, and snippets.

@russellbeattie
Created April 28, 2013 23:18
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save russellbeattie/5478840 to your computer and use it in GitHub Desktop.
Save russellbeattie/5478840 to your computer and use it in GitHub Desktop.
I have a directory where I clone interesting github repos - here's quick script to update them all at once.
p=`pwd`
for dirname in `find . -type d -maxdepth 1 -mindepth 1`
do
if [ -d $dirname/.git ]
then
cd $dirname
echo `pwd`
git pull origin master
fi
cd $p
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment