【问题标题】:how to interpret git describe output如何解释 git describe 输出
【发布时间】:2019-03-14 08:59:42
【问题描述】:

我在玩 git describe:

git branch
  branch1
* master

git tag tag1 HEAD~2

git tag tag2 HEAD

git describe --all HEAD~1
tags/tag1-1-gb772e8b

git rev-parse tag1
1ae346a3b91f5dbe4110ae143ce86825d79b82f3

“tag1-1-gb772e8b”中的“1-gb772e8b”是什么意思?

【问题讨论】:

    标签: git


    【解决方案1】:
    tag1-1-gb772e8b
    ^    ^  ^ 
    |    |  |
    |    |  git hash of the commit  
    |    |
    |   number of commits after the tag 
    |
    |
    Most recent tag
    

    这都是关于你给 git describe 的提交。 在你的情况下它是 HEAD~1,所以

    • HEAD~1 具有提交哈希 b772e8b
    • HEAD~1 是最近标记之后的 1 次提交
    • 早于 HEAD~1 的最新标签是 tag1

    请参阅documentation 以获得更深入的信息,输出取决于 是否有任何标签,存储库处于什么状态以及您提供给git describe的参数

    哈希中还有一个ggb772e8bdocs 将其描述为

    “g”前缀代表“git”,用于描述 软件版本取决于 SCM 软件被管理 与。

    【讨论】:

      猜你喜欢
      • 2015-02-15
      • 1970-01-01
      • 2021-08-28
      • 1970-01-01
      • 2011-09-30
      • 1970-01-01
      • 2015-11-11
      • 2016-08-18
      • 2011-09-14
      相关资源
      最近更新 更多