git update submodule from branch code example Example: git checkout branch and update submodules git checkout --recurse-submodule