Skip to content
This repository

Installing on Windows

This page outlines the installation of the gitflow scripts on the three major distributions of git. Please follow the directions for your git distribution.

For Windows users, msysgit is a good starting place for installing git.


For Windows users who wish to use the automated install, it is suggested that you install Cygwin first to install tools like git, util-linux and wget (with those three being packages that can be selected during installation). Then simply run this command from a Cygwin shell in your $HOME:

$ wget -q -O - --no-check-certificate | bash

If you get the error "flags: FATAL unable to determine getopt version" error after

$ git flow init

you need to install the util-linux package using the Cygwin setup.

If you get something like "$'\r': command not found" then it's a problem with your line endings. You should run the following:

$  sed -i 's/\n\r/\n/mg' /usr/local/bin/git-flow*
$  sed -i 's/\n\r/\n/mg' /usr/local/bin/gitflow-*


Download and install getopt.exe from the util-linux package into C:\Program Files\Git\bin. (Only getopt.exe, the others util-linux files are not used). Also install libintl3.dll and libiconv2.dll from the Dependencies packages (libintl and libiconv), into the same directory.

Clone the git-flow sources from GitHub:

$ git clone --recursive git://
$ cd gitflow

Run the msysgit-install script from a command-line prompt (you may have to run it with "Full Administrator" rights if you installed msysgit with its installer, and ensure you're running from a Windows command prompt, not MINGW):

C:\gitflow> contrib\msysgit-install.cmd

In Git bash create a symbolic link for git-flow so that you can actually use the $ git flow command from any location.

$ ln -s /C/gitflow/git-flow git-flow

GitHub for Windows

GitHub for Windows uses a portable installation of MSysGit for its shell. You'll need to follow the above instructions for MSysGit, except for two differences, both of which rely on the install location for GHfW's MSysGit install location. To find that location:

Navigate to the GitHub directory under the OS's "Local Application Data" directory. On Windows 7, it is located at: "C:\Users\USER_NAME\AppData\Local\GitHub". Look for a directory named something similar to "PortableGit_8810fd5c2c79c73adcc73fd0825f3b32fdb816e7". Note: the GUID at the end may change.

Once you have the location, use it to perform the following (refer to the above MSysGet instructions above for more details):

Copy getopt.exe and libintl3.dll to the bin directory directly under the location found above. In Windows 7, you would copy the files to: "C:\Users\USER_NAME\AppData\Local\GitHub\PortableGit_8810fd5c2c79c73adcc73fd0825f3b32fdb816e7\bin".

Open the GitHub for Windows Git Shell and check that you are in the GitHub root directory e.g. C:\GitHub> Clone the GitFlow folder with

C:\GitHub> git clone --recursive git://

This will clone the GitFlow code into a new gitflow folder in your GitHub directory. You can select a different location if you prefer or you can remove the GitFlow clone later.

Change to the GitFlow directory:

C:\GitHub> cd gitflow

Run the msysgit-install script with the location as a parameter. For example:

C:\GitHub\gitflow [develop]> contrib\msysgit-install.cmd "C:\Users\USER_NAME\AppData\Local\GitHub\PortableGit_8810fd5c2c79c73adcc73fd0825f3b32fdb816e7"

Note: Replace PortableGit_8810fd5c2c79c73adcc73fd0825f3b32fdb816e7 with the name of your directory; you do not need the \bin at the end.

Check that GitFlow is installed by calling the help:

C:\GitHub> git flow help 
Something went wrong with that request. Please try again.