Gitflow错误:无法初始化

5
我已经在我的Github项目所在目录中安装了Gitflow。
然而,当我尝试使用命令“git flow init”开始时,我收到了以下错误信息:
git flow init
C:/cygwin64/usr/local/bin/gitflow-shFlags: line 1: shFlags/src/shflags: No such file or directory
C:\cygwin64\usr\local\bin\git-flow: line 85: DEFINE_boolean: command not found
C:\cygwin64\usr\local\bin\git-flow: line 88: FLAGS: command not found
fatal: 'flow' appears to be a git command, but we were not
able to execute it. Maybe git-flow is broken?

有什么办法可以解决这个问题吗?
2个回答

5
问题报告issue 190提到了类似的问题,并建议您使用src/shflags自行恢复shFlags/src/shflags文件。

为了使git-flow调用gitflow-shFlags成功,必须恢复该文件:

. "$GITFLOW_DIR/gitflow-shFlags"

使用gitflow-shFlags
shFlags/src/shflags

1
使文件 /usr/local/bin/gitflow-shFlags 不再包含单行内容,而是从 git 仓库 (https://github.com/nvie/shFlags/blob/master/src/shflags) 中获取完整文件。 - ThomasRS

0
我遇到过这样的问题!我已经解决了,只需更改 git-flow 文件的第 83 行:

#use the shFlags project to parse the command line arguments . "$GITFLOW_DIR/gitflow-shFlags"

将其更改为 gitflow-shFlags 的值:

# use the shFlags project to parse the command line arguments . "$GITFLOW_DIR/shFlags/src/shflags"


网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接