Git submodule to track remote branch
I'm trying to use git submodules for aggregating 10+ repositories into one structure for easy development. It is supposed to clone the module and checkout a branch. Instead, the module is checked out in detached head mode. git clone git@github.com:org/global-repository.git git submodule update —init cd config-framework git status $git status #HEAD detached at b932ab5 nothing to commit, working directory clean gitmodules files seems to be okay $cat .gitmodules [submodule "config-framework"] path = config-framework url = git@github.com:org/config-framework.git branch = MY_BRANCH We want the MY