I have a project with a master and staging branch. The project has a submodule which also had a master and staging branch.
My .gitmodules file has referenced the branch correctly so e.g. my project on branch master has the following
[submodule "src/mysubmodule"]
path = src/mysubmodule
url = https://username@bitbucket.org/username/mysubmodule.git
branch = master
and the branch staging has
[submodule "src/mysubmodule"]
path = src/mysubmodule
url = https://username@bitbucket.org/username/mysubmodule.git
branch = staging
I want to switch the branch of my submodule(s) as well if i switch the branch of my project. git checkout master
etc.