Gitflow 安装问题

标签 git git-flow

我正在尝试使用此处的说明在 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 中工作的方式:

  1. 安装 msysgit:http://code.google.com/p/msysgit/
  2. 按照 gitflow 自述文件中的安装说明进行操作:https://github.com/nvie/gitflow
  3. 下载“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/

相关文章:

git - 在 Gitlab 的 Dockerfile 上使用 SSH key - 权限被拒绝

git - 通过 rest api 访问内部 gitlab repo 获取项目的所有分支时获取 404

git - 试图了解 Travis CI 的作用以及何时应该使用它

git - 弧形土地失败 : no commits on <feature-branch> which are not already present on target

git - 在先前 merge 到开发分支后删除或重新 merge Gitlow 功能分支是否安全?

git - Git 中的分支和 merge 最佳实践

git - 使用 git-flow 更新子模块

git - 在源分支中列出冲突文件路径的命令是什么

Git:如何将一个 Remote 从另一个 Remote rebase

git undo merge and add for 单个文件