Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

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.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 261431
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T22:25:53+00:00 2026-05-11T22:25:53+00:00

In my repository, I have created tags using the following commands. git tag v1.0.0

  • 0

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?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-11T22:25:53+00:00Added an answer on May 11, 2026 at 10:25 pm
    git tag
    

    should be enough. See git tag man page


    You also have:

    git tag -l <pattern>
    

    List tags with names that match the given pattern (or all if no pattern is given).
    Typing "git tag" without arguments, also lists all tags.


    More recently ("How to sort git tags?", for Git 2.0+)

    git tag --sort=<type>
    

    Sort in a specific order.

    Supported type is:

    • "refname" (lexicographic order),
    • "version:refname" or "v:refname" (tag names are treated as versions).

    Prepend "-" to reverse sort order.


    That lists both:

    • annotated tags: full objects stored in the Git database. They’re checksummed; contain the tagger name, e-mail, and date; have a tagging message; and can be signed and verified with GNU Privacy Guard (GPG).
    • lightweight tags: simple pointer to an existing commit

    Note: the git ready article on tagging disapproves of lightweight tag.

    Without arguments, git tag creates a “lightweight” tag that is basically a branch that never moves.
    Lightweight tags are still useful though, perhaps for marking a known good (or bad) version, or a bunch of commits you may need to use in the future.
    Nevertheless, you probably don’t want to push these kinds of tags.

    Normally, you want to at least pass the -a option to create an unsigned tag, or sign the tag with your GPG key via the -s or -u options.


    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:

    git show-ref --tags -d
    

    Which lists tags with their commits (see "Git Tag list, display commit sha1 hashes").
    Note the -d in 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:

    "listing tags starting with tag α":

    git tag --sort=-creatordate --contains α
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I created the following Repository structure using VisualSVN MyCompanyRepository Project1 branches tags trunk I
I have just created a new Git repository backed by Subversion, using git svn.
I'm using git-svn to work with an SVN repository. My working copies have been
Since I created my repository it appears that the tags I have been creating
I have a git repository where I have created two different jobs in Jenkins
I have a repository that has the following directories: branches tags trunk The trunk
I have to create several tags every day in a Git repository. When I
I am new to Repository concept and get some questions. I have created simple
I a xampp setup for php. I have created a new repository at D:/xampp/htdocs/cart
I have a local repository. I created the whole application, but now I want

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.