How do you push a tag to a remote repository using Git? How do you push a tag to a remote repository using Git? git git

How do you push a tag to a remote repository using Git?


To push a single tag:

git push origin <tag_name>

And the following command should push all tags (not recommended):

# not recommendedgit push --tags


git push --follow-tags

This is a sane option introduced in Git 1.8.3:

git push --follow-tags

It pushes both commits and only tags that are both:

  • annotated
  • reachable (an ancestor) from the pushed commits

This is sane because:

It is for those reasons that --tags should be avoided.

Git 2.4 has added the push.followTags option to turn that flag on by default which you can set with:

git config --global push.followTags true

or by adding followTags = true to the [push] section of your ~/.gitconfig file.


To push specific, one tag do followinggit push origin tag_name