Here’re some simple commands to step into each submodule in a git repository to checkout master and pull from origin.
git pull
git submodule foreach --recursive git checkout master
git submodule foreach --recursive git pull
References:
https://stackoverflow.com/questions/1030169/pull-latest-changes-for-all-git-submodules