Skip to content

Commit 29d5553

Browse files
danielesegatogitster
authored andcommitted
docs/git-tag: explain lightweight versus annotated tags
Stress the difference between the two with a suggestion on when the user should use one in place of the other. Signed-off-by: Daniele Segato <daniele.segato@gmail.com> Signed-off-by: Jeff King <peff@peff.net> Reviewed-by: Jonathan Nieder <jrnieder@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
1 parent 1599999 commit 29d5553

1 file changed

Lines changed: 11 additions & 0 deletions

File tree

Documentation/git-tag.txt

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,17 @@ committer identity for the current user is used to find the
4242
GnuPG key for signing. The configuration variable `gpg.program`
4343
is used to specify custom GnuPG binary.
4444

45+
Tag objects (created with `-a`, `s`, or `-u`) are called "annotated"
46+
tags; they contain a creation date, the tagger name and e-mail, a
47+
tagging message, and an optional GnuPG signature. Whereas a
48+
"lightweight" tag is simply a name for an object (usually a commit
49+
object).
50+
51+
Annotated tags are meant for release while lightweight tags are meant
52+
for private or temporary object labels. For this reason, some git
53+
commands for naming objects (like `git describe`) will ignore
54+
lightweight tags by default.
55+
4556

4657
OPTIONS
4758
-------

0 commit comments

Comments
 (0)