Ad space (banner)
🌿Git Lessons
Lesson 43 / 59

Creating an Annotated Tag with git tag -a

This lesson is for anyone who wants to create an annotated tag with a description, using git tag -a v1.0 -m "First release". git tag -a isn't just a marker — it's a command that records who created the tag, when, and for what purpose.

Use it in the form git tag -a tagname -m "message". -a stands for annotated, and after -m you give a message, like release notes. Skip -m and an editor opens for you to type the message there.

Running git tag -a v1.0 -m "First release" records a message, author name, and date on the v1.0 tag. The difference from a plain lightweight tag made with just git tag v1.0 is exactly this extra recorded information.

A common early mistake is writing git tag v1.0 -m "..." without the -a flag, so the message gets silently ignored — keep in mind that -a and -m are meant to be used together.

Release tags on public projects almost always use annotated tags. Combined with a GPG signature (-s), you can even prove a release genuinely came from you.

Git
Try it (type this into the pseudo terminal)
git tag -a v1.0 -m "First release"

🧑‍💻 You can type this command into the Git pseudo terminal to try it yourself (this page itself has no interactive terminal).

Ad space (banner)
Ad space (in-article)