如何在我的Git存储库中创建日期列出所有标记? [英] How can I list all tags in my Git repository by the date they were created?

查看:96
本文介绍了如何在我的Git存储库中创建日期列出所有标记?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要一些方法来根据创建日期列出系统中的所有标签,但不确定是否可以通过git-log获取这些数据。想法?

解决方案

如果它是一个带注释的标签,则可以使用标签日期:

  git for-each-ref --sort = taggerdate --format'%(refname)%(taggerdate)'refs / tags 

b $ b

I 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屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆