https://git-scm.com/book/en/v2/Git-Tools-Submodules To also initialize, fetch and checkout any nested submodules, you can use the foolproof  `git submodule update --init --recursive` Change submodule branch: `git config -f .gitmodules submodule.<SubmoduleName>.branch <BranchName>`