Skip to content

Git Tagging

Roger Xu edited this page May 20, 2016 · 2 revisions

Git - Tagging

Git uses two main types of tags: lightweight and annotated.

A lightweight tag is very much like a branch that doesn’t change – it’s just a pointer to a specific commit.

Annotated tags, however, are stored as full objects in the Git database. They’re checksummed; contain the tagger name, email, and date; have a tagging message; and can be signed and verified with GNU Privacy Guard (GPG). It’s generally recommended that you create annotated tags so you can have all this information; but if you want a temporary tag or for some reason don’t want to keep the other information, lightweight tags are available too.

Annotated Tags

$ git tag -a 1.1.1 -m "Release version 1.1.1"
$ git tag
$ git show 1.1.1
$ git push origin 1.1.1

Lightweight Tags

$ git tag takt-1
$ git tag
$ git show takt-1
Clone this wiki locally