我正在尝试使用此处的说明在 Windows 上运行 gitflow:https://github.com/nvie/gitflow (我使用的是 Windows Server 2003 SP2 64 位)
Cygwin 和 msysgit 我都试过了。
使用 Cygwin,调用 wget 什么都不返回。
使用 msysgit 我走得更远,但是当我尝试运行 git flow init 时,我收到以下错误:
C:\Program Files (x86)\Git/libexec/git-core/git-flow: line 45: dirname: command not found
C:\Program Files (x86)\Git/libexec/git-core/git-flow: line 68: /gitflow-common: No such file or directory
C:\Program Files (x86)\Git/libexec/git-core/git-flow: line 76: /gitflow-shFlags: No such file or directory
查看 git-flow bash 文件中的第一个错误,第 45 行包含:
export GITFLOW_DIR=$(dirname "$0")
我也尝试按照此处的步骤操作 https://github.com/nvie/gitflow/issues/issue/25?authenticity_token=54d6387519b4751c2fb13840c52bb819dee10af4但这没有任何区别。
有什么想法吗?
谢谢
最佳答案
这就是我让它在 Windows 中工作的方式:
- 安装 msysgit:http://code.google.com/p/msysgit/
- 按照 gitflow 自述文件中的安装说明进行操作:https://github.com/nvie/gitflow
- 下载“git-flow-completion”:https://github.com/bobthecow/git-flow-completion
- 将“git-flow-completion.bash”从 git-flow-completion zip 文件复制到 C:\Program Files (x86)\Git\etc
- 在 C:\Program Files (x86)\Git\etc 中创建一个名为“bash_profile”(无扩展名)的新文件并添加以下一行:
source "c:\Program Files (x86)\Git\etc\git-flow-completion.bash"
关于Gitflow 安装问题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/4661136/