Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Error installing Git-Flow in bash for GitHub for Windows

I'm fairly new to Git, and started by using GitHub for Windows. Now I've learned how to open a Git bash....and want to install Git Flow into it.

I'm trying to follow the steps here:- https://github.com/nvie/gitflow/wiki/Windows

During the installation, when I try to run the msysgit-install script using my path for the PortableGit folder, the script fails saying:-

contrib/msysgit-install.cmd: line 1: @echo: command not found
contrib/msysgit-install.cmd: line 2: setlocal: command not found

etc...

Is there something I'm doing wrong, or is my bash not properly setup?

I'm accessing the bash by right clicking on the project in GitHub for Windows, and selecting 'open a shell here'.

Please help.

like image 878
Sean Holmesby Avatar asked Mar 18 '26 17:03

Sean Holmesby


2 Answers

The msysgit-install.cmd script is a windows batch file, don't run it from bash run it from windows command prompt (or double click it from the file browser, but I am not sure if that will work for a .cmd file...)

Also, try using Cygwin instead. It is much simpler.

like image 84
randomusername Avatar answered Mar 20 '26 09:03

randomusername


  • Download here util-linux binaries and dependencies files
  • Uncompress those files (util-linux-ng--bin.zip and util-linux-ng--dep.zip)
  • Copy util-linux-ng-<version>-bin\bin\getopt.exe file into C:\Program Files\Git\bin
  • Copy util-linux-ng-<version>-dep\bin\libintl3.dll and util-linux-ng-<version>-dep\bin\libiconv2.dll files into C:\Program Files\Git\bin
  • Open Git Bash console and clone Git Flow repository: git clone git://github.com/nvie/gitflow.git
  • Go to gitflow directory: cd gitflow
  • Execute command: git submodule
  • Execute command: git submodule init
  • Execute command: git submodule update
  • Open Windows console and go to contrib directory from gitflow directory where you cloned the repository: cd C:\... ...\gitflow\contrib\
  • Execute the command to install git flow: msysgit-install.cmd "C:\Program Files (x86)\Git"
like image 23
John Alexander Betts Avatar answered Mar 20 '26 09:03

John Alexander Betts