我可以让 git-flow 使用普通标签(不是带注释的标签)吗?

Can I make git-flow use normal tags (not annotated tags)?

当我完成发布时,系统提示我输入提交消息,然后是标记消息。我不在我的标签中放置消息(至少不在我的发布标签中)所以我将其留空。结果是没有创建标签,我必须手动创建它,例如:

git tag v1.15.3 master

如何告诉 git-flow 不要使用带注释的标签?


我不想通过在标记消息中添加一些内容来解决这个问题。带注释的标签用于将信息与标签相关联。用它们代替普通标签会让我发疯。

https://github.com/nvie/gitflow/blob/15aab26490facf285acef56cb5d61025eacb3a69/git-flow-release#L248

# git-flow-release - checkout and update this file
# Change lines # 248 in the above file
if ! git_tag_exists "$tagname"; then
    local opts="-a"

删除 local opts 标志

当您使用 git 流程时,在您的计算机上本地安装脚本。
如果你在 unix 上,这取决于风格和安装方式,如果你在 windows 上,它应该在你的相关程序 files\git 文件夹下。

编辑文件并注释 local opts 或删除 -a 并将其留空