git describe --abbrev = 0和git describe --abrev = 0 --tags之间有什么区别

时间:2015-08-04 13:25:13

标签: git

我有一个包含以下输出的回购:

$ git tag
product-picker-v1
v0.0.1
v0.0.2
v0.0.3
v0.0.4
v0.1
v0.1.1
v0.1.10
v0.1.11
v0.1.12
v0.1.12.1
v0.1.13
v0.1.14
v0.1.15
v0.1.2
v0.1.3
v0.1.4
v0.1.5
v0.1.6
v0.1.7
v0.1.8
v0.1.9
$ git describe --abbrev=0
v0.1.14

$ git describe --abbrev=0 --tags
v0.1.15

为什么在没有--tags选项的情况下运行git describe时会返回一个标记?

1 个答案:

答案 0 :(得分:1)

文档正确:--tags来自所有标签,而不仅仅是注释标签。

git-describe Documentation