Skip to content

Instantly share code, notes, and snippets.

@bewt85
Last active August 29, 2015 14:02
Show Gist options
  • Save bewt85/0da18d3182262753a70b to your computer and use it in GitHub Desktop.
Save bewt85/0da18d3182262753a70b to your computer and use it in GitHub Desktop.
Script to pull latest version of submodules
#!/bin/bash
START_DIR=$(pwd)
for dir in $(find . -name ".git" -type d); do
cd $(echo $dir | sed 's/\/.git$//') && git checkout master && git pull && cd $START_DIR;
done
git status
echo "Run the following to update the modules:"
echo 'git commit -am "Update versions of submodules"'
echo 'git push origin master'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment