Git update submodules recursively
git submodule update --recursive
You will also probably want to use the --init option which will make it initialize any uninitialized submodules:
git submodule update --init --recursive
Note: in some older versions of Git, if you use the --init
option, already-initialized submodules may not be updated. In that case, you should also run the command without --init
option.
The way I use is:
git submodule update --init --recursive
git submodule foreach --recursive git fetch
git submodule foreach git merge origin master