Here is a quick snippet that will reset all your git submodules to their most recent commit. Handy when something has happened such as a file permissions change that unintentionally affected the submodules.
git submodule foreach --recursive git reset --hard
git submodule foreach git reset –hard HEAD git submodule update git submodule foreach “git checkout master; git pull” git submodule foreach git clean -f