Skip to content

Instantly share code, notes, and snippets.

@sunnyratilal
Created June 9, 2016 09:25
Show Gist options
  • Save sunnyratilal/6a05f522f45796988c1e5f4da8f2d5a8 to your computer and use it in GitHub Desktop.
Save sunnyratilal/6a05f522f45796988c1e5f4da8f2d5a8 to your computer and use it in GitHub Desktop.
#!/bin/bash
CUR_DIR=$(pwd)
echo "Traversing directories..."
for i in $(find . -name ".git" | cut -c 3-); do
echo $i;
cd "$i";
cd ..;
git pull origin master;
cd $CUR_DIR
done
echo "All repositories successfully updated"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment