I have created a submodule in my git repository (repo1
) by the following command git submodule add https://github.com/user/mod1
. So after adding this command, my repo now contains the sudmodule mod1
.
Now I am applying a tag to my repository repo
using command - git tag -a baseline -m "tagging baseline code
.
I am not sure if this tag will also be applied to the submodule mod1
? When I create a new clone recursively and with specific tag, will I get all the code (including submodule) with the tag I am specifying?
I am not sure if this tag will also be applied to the submodule mod1
Submodule by definition
Submodules
allow foreign repositories to be embedded within a dedicated subdirectory of the source tree, always pointed at a particular commit.
If you will tag your project the tag will not apply to the submodule as well.
By default the new submodule will be tracking HEAD of the master branch but will NOT be updated as you update your primary repo.