Git has two kinds of tags; this is because in some situations you may want to add a message to the tag, or because you like to have the author stick to it.
We already have seen the first type, the simpler one; tags containing this extra information load belong to the second type, the annotated tag.
An annotated tag is both a reference and a git object such as commits, trees, and blobs.
To create one, simply append -a to the command; let's create another one to give this a try:
[8] ~/grocery (bug)$ git tag -a annotatedTag 07b1858
At this point Git opens the default editor, to allow you to write the tag message, as in the following screenshot:
Save and exit, and then see the log:
[9] ~/grocery (bug)$ git log --oneline --graph --decorate --all* 5d605c6 (HEAD -> bug) Another bug!* 07b1858 (tag: bugTag, tag: annotatedTag) Bug eats all the fruits!| * a8c6219 (melons) Add a watermelon| * ef6c382 (berries) Add a blackberry| * 0e8b5cf (master) Add an orange |/
* e4a5e7b Add an apple* a57d783 Add a banana to the shopping list