Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is it possible to find out who created a tag in Git?

Tags:

git

Commits obviously have an author associated with them; but is it possible to find out which user created a tag on a Git repository?

like image 510
Smashery Avatar asked Jul 21 '11 01:07

Smashery


People also ask

How are git tags generated?

In order to create a Git tag for the last commit of your current checked out branch, use the “git tag” command with the tag name and specify “HEAD” as the commit to create the tag from. Similarly, if you want your tag to be annotated, you can still use the “-a” and “-m” options to annotate your tag.

Do git tags get merged?

Tags are not merged, commits (tagged or not) are.

How do I know if my tags are annotated?

If the tag is an annotated tag, you'll see the message and the tag object, followed by the commit. If the tag is a lightweight tag, then you'll see only the commit object. If the current commit exactly matches that of a tag, then only the tag name is printed.


2 Answers

If it's an annotated tag, then yes. You can git show it just like any other object. If it's a lightweight tag, then I don't believe so. Just one of the reasons why you should always annotate the tags you're going to share.

like image 151
Lily Ballard Avatar answered Sep 24 '22 10:09

Lily Ballard


You can use this command to show git tags with date, message and author email:

git for-each-ref --format '%(refname) %09 %(taggerdate) %(subject) %(taggeremail)' refs/tags  --sort=taggerdate 

This is the result of this command when I launch it on Material-UI project:

enter image description here

like image 24
Ala Eddine JEBALI Avatar answered Sep 23 '22 10:09

Ala Eddine JEBALI