You can use git submodule foreach
to handle a batch of submodules:
git submodule foreach git pull origin master
Or, update submodule one by one:
# go to submodule directory and update to latest.
cd {{submodule}}
git pull origin master
Finally, stage the modification for the update of submodule and commit(and push):
# back to main project directory
cd ..
git add {{submodule}} {{submodule}} ...
git ci -m "Update submodule"
DONE.