Domanda

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.

È stato utile?

Soluzione

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.

Altri suggerimenti

  • 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"

My suggestion would be to use Chocolatey and install the 4 packages here: Chocolatey Git-Flow related packages.

Make sure you add your Git\bin install directory to the Path in Environment Variables.

Make sure to restart cmd.exe and run git flow help to ensure it works.

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top