I have a git repository which uses a submodule which I\'d like to point at an annotated tag, but when I do git submodule update
new tags don\'t get fetched. I can g
git submodule update
doesn't fetch anything if your submodules are up-to-date. So this might be a misapprehension.
git submodule update
will bring the working directory contents of the submodules in your repository to the defined state (i.e. check out the submodule commit that has been defined in your repository).
A better way would be to cd
into your submodule (which is a Git repository itself) and simply run git fetch --tags
and then git checkout some-tag
. After that the submodule has been updated in your working directory to some-tag
and you can stage it for committing.