SourceTree and Git Flow repository init

4.7k Views Asked by At
sh.exe C:\Users\username\AppData\Local\Atlassian\SourceTree\gitflow_local\gitflow\git-flow init -d

flags:WARN  -d --

C:\Program Files (x86)\Atlassian\SourceTree\tools\getopt.exe: invalid option -- 

flags:FATAL unable to parse provided options with getopt.

Error Message

I contacted github account, and want to "Git Flow" and it shows a message like above.

1

There are 1 best solutions below

0
On

There was a similar issue reported at Atlassian:

It appears though that the issue was a faulty git flow installation prior to the SourceTree install.
I removed all git flow installation data and reinstalled SourceTree (after removing all SourceTree data as well)

After reinstallation of SourceTree, all is woorking fine! :)

You can see more about git-flow installation within a SourceTree context in this issue:

SourceTree does not install git-flow globally on your system.
If you want to access it directly from command line, the path should be

%USERPROFILE%\AppData\Local\Atlassian\SourceTree\gitflow_local

The git-flow command in MsysGit requires some libs to be in place to work. See https://github.com/nvie/gitflow/wiki/Windows#wiki-msysgit

If you really want to use git-flow at the git bash, I strongly recommend you to install a fresh copy using the instructions in the link above.
If you plan to use git-flow BOTH in the command line and in SourceTree, then use the nvie code in the above link.
If you want to use ONLY in the command line, install the fork https://github.com/petervanderdoes/gitflow. It works (far) better, but you should pay attention to NEVER use the GUI anymore to issue git-flow commands.