7

How can I provide a real message to git flow release finish?

This is what my attempt and it's output look like:

> git flow release finish -m 'Release 0.0.4 - Fixing a bug' 0.0.4
flags:FATAL the available getopt does not support spaces in options

The only way I can get it to work is when I don't use any spaces in the message.

4

3 Answers 3

5

I have the same problem, but get a different error message:

$ git flow release finish -m 'Release 0.0.4 - Fixing a bug' 0.0.4
fatal: too many params
Tagging failed. Please run finish again to retry.

Managed to come up with a workaround that is quite ugly, but seems to work for me, which makes it possible to use in a script.

The idea is to:

  1. populate a file with the tag message
  2. set the git editor command to a simple move command (git provides us with the target destination)
  3. finish the git flow release
  4. unset the git editor command

Don't know which OS you are on, but here is the sequence I'm using on Ubuntu.

$ echo 'Release 0.0.4 - Fixing a bug' > .git/MY_TAGMSG
$ git config core.editor "mv .git/MY_TAGMSG"
$ git flow release finish 0.0.4
$ git config --unset core.editor
1
  • This was helpful for me, as I'm automating releases with Phing. Thanks!
    – Trenton
    Jan 23, 2014 at 18:51
5

Try the command "git flow version".

If you got something like 0.X, the easy way to get this working is to use the new CLI for git-flow

You can find it here:

https://github.com/petervanderdoes/gitflow/wiki

So for me (on MacOsX) the solution was:

sudo brew unlink git-flow 
sudo brew install git-flow-avh
1

Do you have the latest gitflow? It seems your version does not have support for spaces in get-opt options. You should try the following as a workaround:

Install latest gitflow:

$ git clone git://github.com/nvie/gitflow.git

$ cd gitflow

$ git svn clone -r HEAD http://shflags.googlecode.com/svn/trunk/source/1.0 shFlags

$ sudo make install

Install gnu-opt from Homebrew:

$ brew install gnu-getopt

$ echo 'export FLAGS_GETOPT_CMD="$(brew --prefix gnu-getopt)/bin/getopt"' >> ~/.bashrc

$ . ~/.bashrc # notice the period then ~/.bashrc or just start a new terminal

$ echo $FLAGS_GETOPT_CMD

Should return something ending in "bin/getopt" then give your command a try . . .

2
  • Is git svn a valid command? I'm getting an error when i try to run it
    – Greg
    Oct 24, 2013 at 23:30
  • git-svn is not a core git command, you need to install it - i.e. apt-get install git-svn or the equivalent for your OS.
    – Michael
    Oct 28, 2013 at 23:50

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.