Git-flow fails with “fatal: no tag message? / Tagging failed. Please run finish again to retry”

匆匆过客 提交于 2019-12-09 14:36:46

问题


I am using git-flow to manage a project. I am getting the following message when issuing git flow release finish foo:

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

Here is the sequence of steps to reproduce, with a brand new git repository and a single file:

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' 

At this point, error message above pops up, and Vim is called up to add a tag. When I add the tag and save, I end up on the master branch, with the release/1.0 branch still existing. Any ideas what is going wrong? Git flow version is 0.4.1.

Thank you.


回答1:


I had the same problem, it was a core.editor setting that was giving me problems. It turned out I had set up Gedit (no idea how). Try something like git config --global core.editor "vim" or edit the editor line in your .gitconfig.




回答2:


before finish your release/hotfix branch add the tag manually

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

please don`t add spaces in message then finish the release/hotfix then you will be given a window to add a message

if you add the tag and you have issue in message , change the message using

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

please don`t add spaces in message



来源:https://stackoverflow.com/questions/6500965/git-flow-fails-with-fatal-no-tag-message-tagging-failed-please-run-finish

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!