Listing the available tags in Git is straightforward. Just type git tag (with optional -l or --list ). You can also search for tags that match a particular pattern. The command finds the most recent tag that is reachable from a commit.
In order to list Git tags, you have to use the “git tag” command with no arguments. You can also execute “git tag” with the “-n” option in order to have an extensive description of your tag list. Optionally, you can choose to specify a tag pattern with the “-l” option followed by the tag pattern.
git push <remote> --tags will push both lightweight and annotated tags. There is currently no option to push only lightweight tags, but if you use git push <remote> --follow-tags only annotated tags will be pushed to the remote.
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.
I found in this link a solution that fits my needs:
git log --tags --simplify-by-decoration --pretty="format:%ai %d"
I've put that command in an alias in my ~/.alias
, so now everytime I run gitshowtagbydate
I get what I needed.
The git tag -l
shows a list of all tags. The --format
argument can be used to define a custom output. For example:
git tag -l --format='%(refname) %(taggerdate)'
Update, based on the comments below:
git tag -l --sort=-creatordate --format='%(creatordate:short): %(refname:short)'
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With