我通过将标签应用于夜间构建来使用标签。稍后,我想使用 describe --tags --match <latest tag>
的输出告诉我我的图像离每晚构建还有多远。这是用于 QA 测试。
我刚刚在比当前标签旧的克隆中遇到错误。我运行了 git fetch --tags,所以我在 git tag 输出中看到了标签,但是当我运行 git describe --tags --match <tagname>
时, 我得到 fatal: No tags can describe <head sha1 version number>
.此时我无法执行 git pull 来更新工作区。为什么会发生这种情况,是否有解决方法?非常感谢
最佳答案
我刚刚在使用 git version 2.8.3
和命令 git describe --abbrev=0
时遇到了这个错误。
问题是虽然标签存在于源中并且我的本地存储库是最新的,但标签没有提交消息。
在我用标记消息重新标记提交后,错误得到解决:
git tag v1.1.1 -m 'some message'
关于混帐致命 :No tags can describe <sha1 number>,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/6445148/