Capturing tags have a different effect than committing ( git fetch ), as described in Does "git fetch --tags" include "git fetch"? "
The latter will update branch headers and will retrieve tags available from these updated branches.
The first will retrieve all tags, but will not update branch heads.
That way, if your tags can be retrieved from your selected branches, you do not need to include --tags by default.
Given the long history of some repositories (including linux one ), always wanting to get all the tags can clutter the list of tags (the list of tags contaminated with hundreds of unnecessary tags).
Note that running git 1.9 / 2.0 (Q1 2014), git fetch --tags will extract everything (e.g. git fetch ) plus tags. See " Does git fetch --tags git fetch ? "
Request that all tags be retrieved from the remote in addition to what has not yet been selected .
So you can try remote.<name>.tagOpt configuration option :
git config (--global) remote.<name>.tagOpt --tags
By setting it to --tags , you will get all tags from the remote <name> , even if they are inaccessible from the remote branches.
Vonc
source share