Skip to content

Instantly share code, notes, and snippets.

@konr
Created September 13, 2013 21:37
Show Gist options
  • Save konr/6556400 to your computer and use it in GitHub Desktop.
Save konr/6556400 to your computer and use it in GitHub Desktop.
Pull all repos from a dir
#!/bin/sh
repos=/opt/repos/
old_dir=$PWD
for dir in $(find $repos -maxdepth 1 -mindepth 1 -type d); do
cd $dir
echo '###########' $(pwd) '###########'
git pull --ff-only
done
cd $PWD
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment