Brad
Brad

Reputation: 5532

Do git tags have an author and committer?

Related question - Difference between author and committer in Git?

I'm curious if lightweight tags in git have both a committer and author (and committer date and author date) like commits do.

What about annotated tags, are they different in this regard?

Upvotes: 5

Views: 2673

Answers (1)

user743382
user743382

Reputation:

Lightweight tags are not objects, they hold no information of their own, they are purely a reference to some other object (normally a commit). So no, they do not store any info about who created the tag and when.

Annotated tags are indeed different. The point of an annotated tag is that it adds some additional information to an existing object -- the annotation. This immediately provides a place where Git has the capability of storing who created the tag, and indeed it does so. However, this is not separated into author and committer. Annotated tags contain what's called a tagger, which you can see when you git show an annotated tag.

Upvotes: 9

Related Questions