In the current project I'm working on, I'm not able to initialise gitflow
with SourceTree. Can you help?
My version of SourceTree is 2.7.6
.
If I try to do
then I have this dialog
But when I confirm, I have the error
I had exactly the same problem. I moved SourceTree to a different directory, and its path contained a space character from one of its parent directories.
As a result, the path to its internal getopt was stored by SourceTree in ~/.gitflow_export (and, indeed, rewritten at every launch) and contained that space without the required quotes.
Removing the space in the directory name solved the issue. If you move SourceTree around, make sure its path contains no space.
/bin/getopt: not a valid identifier
suggests an issue with getopt
. There were few reported to Attlassian e.g. Is git-flow broken in Sourcetree 2.7.1?
A possible workaround to install getopt
by hand as per Post installation setup:
Install GNU getopt via Homebrew:
brew install gnu-getopt
Create a ~/.gitflow_export with the content export FLAGS_GETOPT_CMD="$(brew --prefix gnu-getopt)/bin/getopt".
For git-flow versions prior to 1.4.0-dev.28
Create a ~/.gitflow_export with the content alias getopt="$(brew --prefix gnu-getopt)/bin/getopt".
If you have installed GNU getopt through other means than Homebrew, substitute $(brew --prefix gnu-getopt)/bin/getopt with the location of the GNU getopt file.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With