如何在摘要的第一行获得标签列表? [英] How can I get a list of tags with the first line of the summary?
本文介绍了如何在摘要的第一行获得标签列表?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
git tag
仅对我显示以下内容:
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
至少按正确的方式排序(尽管我更喜欢相反的顺序).
git tag --sort="v:refname" -l
is at least sorted the right way (although I'd prefer the reverse order).
但是有类似的东西
git log --tags --decorate --simplify-by-decoration --oneline
除了它不打印日志而是进行类似less
的操作(我不确定如何调用)外,我都喜欢它.因此,如果在我输入git tag
时显示该消息,那将很好.
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
.
推荐答案
git tag --list -n1
我什至有一个别名
tags = tag --list -n1
我的意思是git中的别名:
I mean aliases in git:
git config --global alias.tags 'tag --list -n1'
现在您可以执行git tags
.
这篇关于如何在摘要的第一行获得标签列表?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文