如何在我的Git存储库中创建日期列出所有标记? [英] How can I list all tags in my Git repository by the date they were created?
本文介绍了如何在我的Git存储库中创建日期列出所有标记?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我需要一些方法来根据创建日期列出系统中的所有标签,但不确定是否可以通过git-log获取这些数据。想法?
解决方案
如果它是一个带注释的标签,则可以使用标签日期:
git for-each-ref --sort = taggerdate --format'%(refname)%(taggerdate)'refs / tags
$ c $但是如果它是一个轻量级的标签,那么它就没有关于它何时被创建的信息(它所做的只是命名一个对象)。 b $ bI need some way to list all tags in my system by the date they were created but am not sure if I can get that data via git-log. Ideas?
解决方案 If it’s an annotated tag, you can use the tag date:
git for-each-ref --sort=taggerdate --format '%(refname) %(taggerdate)' refs/tags
But if it’s a lightweight tag, there’s no information about when it was created (all it does is name an object).
这篇关于如何在我的Git存储库中创建日期列出所有标记?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文