混帐致命 :No tags can describe <sha1 number>

标签 git tags commit

我通过将标签应用于夜间构建来使用标签。稍后,我想使用 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/

相关文章:

git - 堆栈跟踪 :\sshd. exe : *** fatal error - could not load u, Win32 错误 1114,COPSSH GIT TORTOISEGIT

jquery - 如何在 select2 jquery 中的标记中设置默认值

git - 如何在 git 中仅获取唯一的提交

Windows 上的 git 重命名问题

git - 如何使用Hg-to-Git工具-快速导出?

git - 让git自动提交

html - 为什么浏览器会解析 HTML5 中的自定义标签?

javascript - 多少标签对 Google 标签管理器来说太多了?

java - Java + SQL:INSERT INTO不起作用

visual-studio-2012 - 使用 VS2013 和 VS2012 要求 TFS 提交注释