Git-flow fails with "fatal: no tag message? / Tagging failed. Please run finish again to retry"
Asked Answered
P

3

25

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.

Pb answered 28/6, 2011 at 2:33 Comment(2)
Could not reproduce, using git flow version 0.4.2-pre on Ubuntu Natty.Ambi
What operating system are you using? I'm encountering this issue on Windows 7 using MSYSGIT.Emeryemesis
P
13

Before finishing your release/hotfix branch, add the tag manually:

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

Please don't include spaces in the message, then finish the release/hotfix, and then you will be given a window to add a message.

If you add the tag and you have issues with the message, change the message using:

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

Please don't add spaces in the message.

Pointillism answered 19/11, 2015 at 6:10 Comment(0)
B
12

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.

Balk answered 29/8, 2011 at 13:8 Comment(2)
FYI, if you want gedit to work as the core editor, it has to be started with -s and -w arguments.Lais
I set it to 'nano' and now is good. It was 'vi' I think.Goering
R
5

I've solved this by adding -n at the end of the command like below.

git flow hotfix finish 'hotfix name' -n

-n means no tag.

Revocable answered 21/7, 2020 at 2:20 Comment(1)
The -n needs to go before the hotfix name, not after. github.com/nvie/gitflow/wiki/Command-Line-Arguments#hotfixIngredient

© 2022 - 2024 — McMap. All rights reserved.