在GashHub for Windows的bash中安装Git-Flow时出错

Sea*_*sby 2 git github git-flow github-for-windows

我对Git很新,并开始使用GitHub for Windows.现在我已经学会了如何打开一个Git bash ....并想要将Git Flow安装到其中.

我正在尝试按照这里的步骤: - https://github.com/nvie/gitflow/wiki/Windows

在安装过程中,当我尝试使用PortableGit文件夹的路径运行msysgit-install脚本时,脚本无法说:

contrib/msysgit-install.cmd: line 1: @echo: command not found
contrib/msysgit-install.cmd: line 2: setlocal: command not found
Run Code Online (Sandbox Code Playgroud)

等等...

有什么我做错了,还是我的bash没有正确设置?

我通过右键单击GitHub for Windows中的项目并选择"在这里打开shell"来访问bash.

请帮忙.

ran*_*ame 5

msysgit-install.cmd脚本是一个Windows批处理文件,不要从bash运行它从Windows命令提示符运行它(或从文件浏览器双击它,但我不确定这是否适用于.cmd文件...)

另外,请尝试使用Cygwin.它简单得多.


Joh*_*tts 5

  • 在这里下载util-linux二进制文件和依赖文件
  • 解压这些文件(util-linux-ng--bin.zip 和 util-linux-ng--dep.zip)
  • 复制util-linux-ng-<version>-bin\bin\getopt.exe文件到C:\Program Files\Git\bin
  • 复制util-linux-ng-<version>-dep\bin\libintl3.dllutil-linux-ng-<version>-dep\bin\libiconv2.dll文件到C:\Program Files\Git\bin
  • 打开 Git Bash 控制台并克隆 Git Flow 存储库: git clone git://github.com/nvie/gitflow.git
  • 进入 gitflow 目录: cd gitflow
  • 执行命令: git submodule
  • 执行命令: git submodule init
  • 执行命令: git submodule update
  • 从克隆存储库的目录打开Windows console并转到contrib目录gitflowcd C:\... ...\gitflow\contrib\
  • 执行命令安装git flow: msysgit-install.cmd "C:\Program Files (x86)\Git"