When fetching a single branch, git fetch includes any tags that point into the branch:
When refspec stores the fetched result in remote-t
You can try, with git1.8.3+ (May 2013):
git push --follow-tags
The new "
--follow-tags" option tells "git push" to push relevant annotated tags when pushing branches out.
This won't push all the tags, but only the ones accessible from the branch(es) HEAD(s) you are pushing.
As mentioned in "Push a tag to a remote repository using Git?", this concerns only annotated tags, not lightweight tags.
git tag 1.0 (lightweight) would not be pushed with --follow-tags, it would with git push --tags.
With Git 2.4.1+ (Q2 2015), that option can be set as default.
See commit a8bc269 by Dave Olszewski (cxreg):
make it easier to add new configuration bits and then add
push.followTagsconfiguration that turns--follow-tagsoption on by default.
The documentation will include:
push.followTags::
If set to true enable '
--follow-tags' option by default. You may override this configuration at time of push by specifying '--no-follow-tags'
Do enable this setting globally, you can run git config --global push.followTags true. It can also be specified on a per repository-basis.