Git-flow 失败并显示 "fatal: no tag message?/Tagging failed. Please run finish again to retry"

标签 git git-flow

我正在使用 git-flow管理一个项目。我在发出 git flow release 时收到以下消息 完成 foo:

fatal: no tag message? 
Tagging failed. Please run finish again to retry. 

这是重现的步骤序列,使用全新的 git 存储库和单个文件:

touch test.txt 
git init 
git add . 
git commit -m "Initial commit" 
git flow init 
[defaults accepted] 
git flow release start 1.0 
echo "Line 1" >> test.txt 
git add . 
git commit -am "Line added" 
git flow release finish '1.0' 

此时 pop 上面的错误信息,调用Vim 添加标签。当我添加标签并保存时,我最终进入了母版 分支,release/1.0 分支仍然存在。任何想法是什么 出错了吗? Git 流版本是 0.4.1。

谢谢。

最佳答案

在完成发布/修补程序分支之前,手动添加标签:

git tag -a v0.1.2 -m "release_added"

请不要在消息中包含空格,然后完成发布/修补程序,然后您将看到一个窗口来添加消息。

如果您添加了标签并且消息有问题,请使用以下方法更改消息:

git tag <tag name> <tag name> -f -m "<new message>"

请不要在消息中添加空格。

关于Git-flow 失败并显示 "fatal: no tag message?/Tagging failed. Please run finish again to retry",我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/6500965/

相关文章:

git - Sourcetree 和 GitFlow - 不显示颜色分支

git - 是否可以使用 git-flow(或 vanilla git)在 master 和 develop 分支上拥有不同的(构建)文件集?

Git 流 : How to keep master log clean?

具有未暂存更改的 git 存档

Git:压缩不是最近提交的连续提交,并且不从根开始

git - 如何将远程 git repo 添加和 pull 到包含大量未跟踪文件的项目

git stash 恢复被忽略的文件

git - 当我需要其他分支的一些代码时如何为功能创建分支(未 merge 到开发分支中)

git - 为什么在Android Studio 3.4.2 中从Git clone 项目时只创建本地master 分支?

git - merge 到 master 时为什么要删除功能分支