git checkout branch and update submodules
git checkout --recurse-submodule
git submodule change branch
cd /path/to/parent/repo git config -f .gitmodules submodule.asubmodule.branch abranch
Source: riptutorial.com