Git: Tags

Creating an annotated tag

Annotated tags, are full objects in the Git database. They have a checksum, they contain the user's name and email that created the tag, the date, a tag message, and can be signed and verified with GNU Privacy Guard (GPG).


$ git tag -a v2.3 -m "Milestone 2.3"

Creating a lightweight tag

A lightweight tag is like a branch that doesn’t change. It’s a pointer to a specific commit.


$ git tag v1.2-lw

Listing tags

Listing all the tags on a project is quite straight forward.


$ git tag
v0.1
v1.0
v1.1
v1.2-lw
v2.0
v2.1
v2.2
v2.3

Although, if you want to display a sub list you have to provide the -l argument with a particular pattern

$ git tag -l "v2.*"
v2.0
v2.1
v2.2
v2.3

				

See Also

Links

Radio Channels

Electronic