There are a couple of considerations:
- What capabilities do you need?
- Do you need git(1) to respect it as a “first-class” tag?
Capabilities
An annotated tag lets you create a message and sign it. It also gives
you metadata about the tagger. Do you need that?
Sometimes I just want to mark a commit temporarily, like “before big
regression” or “before big rewrite”. I don’t
need any tag message for that, and in fact being prompted about it would
be distracting.
But for a release tag you might want to write a tag message. And maybe
also sign it.
First-class tag
With a lightweight tag you’re always going to have to check whether
whatever Git manpage really meant “tag” as in “any tag” or specifically
“annotated tag”, i.e. what I’m calling a “first-class” tag.
At my job we didn’t really care one way or the other about whether our
release tags were lightweight or annotated. Right up until we noticed
that git-describe(1) didn’t behave like we expected, since we had a mix
of lightweight and annotated tags (this command only looks at annotated
tags by default).
So we started using annotated tags. Not because of the first
consideration (capabilities) since:
- The tag message for
v5.6.7
might just be… v5.6.7
- It doesn’t matter who made the tag (the author)
- We don’t sign our tags (or anything)
But using annotated tags turned out to be more convenient just because
then we are using a “release tag”, as far as the git(1) suite is
concerned.