Just as a kind of mini cheat sheet for using git tags. <ahref="http://ariejan.net/2009/09/04/git-tag-mini-cheat-sheet/comment-page-1/#comment-10876">Jörg Mittag</a> had some great additions that weren't in the original post which warrant a new post.
In the previous cheat sheet only the lightweight local tags were discussed. A lightweight tag is nothing more than a reference to a particular revision or SHA1 object name in the repository. This kind of tag is quick and easy and very usable for local development to mark places in your commit history.
Annotated tags are almost like lightweight tags, the big difference is that they contain a message. Normally this message indicated why this tag is interesting. Use the <code>-a</code> option to create an annotated tag.
Since a message is required for annotated tags, you will be prompted with an editor to enter a message, or you can use the <code>-m</code> option to specify one directly.
This will not only show the messages for the annotated tags, it will also show the commit message of the revisions tagged with lightweight tags as well. Quite useful!
Signed tags take annotated tags a step further, they include an OpenPG signature to provide trust. While gits SHA1 tags provide integrity for the repository, the OpenPG signature makes sure that a trustworthy person created the tag.
To create a signed tag you'll need to have GPG or some other OpenPG tool setup and use the <code>-s</code> option to sign the tag: