如何在git中列出所有标记以及完整的消息? [英] How to list all tags along with the full message in git?
问题描述
我希望git列出所有标签以及完整的注释或提交消息。像这样的东西很近:
I want git to list all tags along with the full annotation or commit message. Something like this is close:
git tag -n5
这正是我想要的,除了它只会显示标签消息的前5行。
This does exactly what I want except that it will only show up to the first 5 lines of the tag message.
我想我可以使用一个非常大的数字。这里可以使用的最高号码是什么?每台电脑都一样吗?
I guess I can just use a very large number. What is the highest number I can use here? Is it the same on every computer?
更新:我有很多时间考虑这个问题,现在我认为我没有如果它非常长,就必须显示整个消息。像这样的东西似乎对我很好:
UPDATE: I have had much time to think about this, and now I think I don't necessarily want to show the entire message if it is extraordinarily long. Something like this seems to work fine for me:
git tag -n99
如果标签信息超过99行,我不想看到全部内容。但Git非常复杂和灵活。在什么情况下,这不是最好的解决方案?我注意到很多发布的解决方案都使用了 -l </ code> otion,但这并不仅仅是指定要搜索的模式吗?
If the tag message is really longer than 99 lines, I don't want to see all of it. But Git is extremely complex and flexible. In what cases would this not be the best solution? I noticed many of the posted solutions used the -l
otion, but isn't that just for specifying a pattern to search for?
推荐答案
git tag -n99
简短而甜美。这将从注释/提交消息中列出多达99行。这是一个链接到git标签的官方文档: http://git-scm.com/docs/git-tag
Short and sweet. This will list up to 99 lines from the annotation/commit message. Here is a link to the official documentation for git tag: http://git-scm.com/docs/git-tag
这篇关于如何在git中列出所有标记以及完整的消息?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!