问题
git tag
only shows the following for me:
v1.0
v2.0
v3.0
v4.0
v5.0
v7.10
v7.2
v7.3
v7.4
v7.5
v7.6
v7.7
v7.8
v7.9
git tag --sort="v:refname" -l
is at least sorted the right way (although I'd prefer the reverse order).
But is there something similar to
git log --tags --decorate --simplify-by-decoration --oneline
Except for the fact that it does not print the log but make something like less
does (I'm not sure how it is called), I like it. So it would be good if that was displayed when I enter git tag
.
回答1:
git tag --list -n1
I even have an alias
tags = tag --list -n1
I mean aliases in git:
git config --global alias.tags 'tag --list -n1'
Now you can do git tags
.
来源:https://stackoverflow.com/questions/45939821/how-can-i-get-a-list-of-tags-with-the-first-line-of-the-summary