And*_*Ray 2 tags git bash git-tag
$ git tag hello
$ git describe --tags
hello
... work work ...
$ git commit -m "work stuff"
$ git describe --tags
hello-1-48281
Run Code Online (Sandbox Code Playgroud)
说什么?什么是额外的东西?看起来不像SHA1 ......是否可以回到"你好"?
说什么?什么是额外的东西?看起来不像SHA1 ......是否可以回到"你好"?
"git describe"可能不会做你认为它做的事情:
Run Code Online (Sandbox Code Playgroud)DESCRIPTION The command finds the most recent tag that is reachable from a commit. If the tag points to the commit, then only the tag is shown. Otherwise, it suffixes the tag name with the number of additional commits on top of the tagged object and the abbreviated object name of the most recent commit.
所以,在你的"hello-1-48281"的例子中,git说," hello
标签由当前对象的1次提交分隔,即48281
."
如果你想要一个标签列表,那就做吧git tag -l
.