We can add an annotation to a tag by running the git tag command with the
-a option, which opens the default text editor that lets you add notes.
You can also use the
-am option instead if you want to add the note alongside the tag creation.
Run the following command to add a tag for HEAD named
tag2 with some notes:
$ git tag -am "Simple Git tutorial for beginners" tag2
-n option will give you the list of tags with their notes for this repository.
$ git tag -n tag1 first commit tag2 Simple Git tutorial for beginners