How does git submodule add -b work?
After adding a submodule with a specific branch, a new cloned repository (after git submodule update --init
To switch branch for a submodule (assuming you already have the submodule as part of the repository):
cd to root of your repository containing the submodules.gitmodules for editingpath = ... and url = ... that says branch = your-branch, for each submodule; save file .gitmodules.$ git submodule update --remote...this should pull in the latest commits on the specified branch, for each submodule thus modified.