Git Cheat Sheet · Tags
Publish a tag
git push origin <tag>
An ordinary git push does not send tags. To publish a tag, run git push origin <tag>. This push is often what triggers the release pipeline for a new version.
What it does
Tags do not go along with an ordinary push: they are pushed explicitly.
A use case
Your release pipeline starts when a "v*" tag arrives on the remote.
On the command line
git push origin v1.2.0- Publishes a tag.
git push --tags- Publishes all local tags.
git push --follow-tags- Publishes commits and the annotated tags that point to them.
git config --global push.followTags true- Makes
--follow-tagsthe default behavior.
In Merathon
- "Tags" section of the left panel, right-click the tag → "Push to <remote>".
Frequently asked questions
Why does my tag not appear on GitHub?
It has not been pushed: git push origin <tag>.
How do I get the remote's tags?
git fetch --tags.