SourceTree and Git Flow repository init

自作多情 提交于 2019-12-08 06:49:30

问题


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.

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


回答1:


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.



来源:https://stackoverflow.com/questions/26922524/sourcetree-and-git-flow-repository-init

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!