How does git submodule add -b
work?
After adding a submodule with a specific branch, a new cloned repo (after git submodule update --init
) will be at a specific commit, not the branch itself (git status
on the submodule shows "Not currently on any branch").
I can't find any information on .gitmodules
or .git/config
about the submodule's branch or any specific commit, so how does git figure it out?
Also, is it possible to specify a tag instead of a branch?
Thanks!
PS: I'm using 1.6.5.2
.