Skip to content

Instantly share code, notes, and snippets.

@eribeiro
Created August 18, 2015 17:06
Show Gist options
  • Save eribeiro/74c8e4101203c9d8d432 to your computer and use it in GitHub Desktop.
Save eribeiro/74c8e4101203c9d8d432 to your computer and use it in GitHub Desktop.
Does a git pull origin on each sub-directory of where the script is located.
#!/bin/bash
for i in `ls -d */`; do
echo "updating $i"
cd $i
if [ -d ".git" ]; then
git pull origin
fi
cd -
done
echo "done."
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment