Skip to content


Impossible to reinitialize workspace #28

trivoallan opened this Issue · 6 comments

3 participants


Using Ubuntu 10.04 and code from develop branch (4de01f2)

$ git flow init -f
flags:WARN getopt: option invalide -- 'f'
 -- 'init'
flags:FATAL unable to parse provided options with getopt.

This is a known issue with shFlags on Ubuntu's getopt. Will have to see whether the shFlags project can pick this up, or whether we could provide a patch for the shFlags repo ourselves.

A workaround for now is to run the following commands:

git config --unset gitflow.branch.master
git config --unset gitflow.branch.develop
git config --unset gitflow.prefix.feature
git config --unset gitflow.prefix.release
git config --unset gitflow.prefix.hotfix
git config --unset
git config --unset gitflow.prefix.versiontag

Then call git flow init without the -f option.


Ok. Thanks for the workaround. is there a place where i can vote for resolution of the upstream bug ?


I've only recently tested gitflow on Ubuntu, so it's fairly fresh. Haven't had the time to figure out how to translate this exactly to a bug report on shFlags. Help is appreciated with this one.


Decided not to invest in shFlags. Will do a complete reimplementation of gitflow in Python soon (, which won't suffer from the command line platform difficulties.


Fixed in e1ec57d and confirmed on Ubuntu!


Can confirm this fixed on Debian as well. (was broken in 0.4-dev)

@gmallard gmallard pushed a commit that referenced this issue
@nvie Tell getopt to parse POSIX compatible.
By setting the environmental variable POSIXLY_CORRECT, getopt behaves
strictly POSIX-compatible.  This fixes the incorrect getopt parsing
style that breaks git-flow in several flavours of Linux.

Many thanks to Thiana for figuring this one out.

This should fix issues #28 and #29.
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.