在Git中获取最新标签的最简单方法是什么?
git tag a HEAD
git tag b HEAD^^
git tag c HEAD^
git tag输出:
a
b
c我是否应该编写一个脚本来获取每个标记的日期时间并对它们进行比较?
发布于 2009-09-10 11:58:15
你可以看看git describe,它做的事情和你所要求的很接近。
发布于 2011-09-01 01:39:30
要获取最新的标记(后面的示例输出):
git describe --tags --abbrev=0 # 0.1.0-dev要获得最新的标记,以及标记对象顶部的额外提交次数,请执行更多操作:
git describe --tags # 0.1.0-dev-93-g1416689要获取最新的带注释的标记,请执行以下操作:
git describe --abbrev=0发布于 2011-11-02 19:02:44
将输出所有分支的最新标记提交的标记
git describe --tags $(git rev-list --tags --max-count=1)https://stackoverflow.com/questions/1404796
复制相似问题