In my repository, I have created tags using the following commands.
git tag v1.0.0 -m 'finally a stable release'
git tag v2.0.0 -m 'oops, there was still a major bug!'
How do you list all the tags in the repository?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
should be enough. See
git tagman pageYou also have:
More recently ("How to sort git tags?", for Git 2.0+)
That lists both:
Note: the git ready article on tagging disapproves of lightweight tag.
That being said, Charles Bailey points out that a ‘
git tag -m "..."‘ actually implies a proper (unsigned annotated) tag (option ‘-a‘), and not a lightweight one. So you are good with your initial command.This differs from:
Which lists tags with their commits (see "Git Tag list, display commit sha1 hashes").
Note the
-din order to dereference the annotated tag object (which have their own commit SHA1) and display the actual tagged commit.Similarly,
git show --name-only <aTag>would list the tag and associated commit.Note: use Git 2.37 with
git show-ref --heads/--tags.Hi-Angel adds in the comments: