If you want to install Git on Windows you have two options; using msysgit or Cygwin. Using msysgit is the easiest way and probably the most popular one, but it does not allow you to use the latest version of Git as soon as it’s released. This is one of many reasons I prefer Cygwin over msysgit but it shouldn’t be any limitation if you prefer one option over the other. Since I’m a Cygwin user, it was a natural choice for me, so fell free to chose the one that suits you best.
That said, I’ll show you how to install Git v1.7.0 using Cygwin v1.7.1-1 on Windows 7.
Installing Cygwin
Download Cygwin here and run the setup. Accept the defaults (or customize it if you prefer to install in different place) until you get to the “Select Packages” step.
To select a package, change the “View” to full, type the name in the search box and press the word “Skip” once. This will select the last available version and all the required package dependencies as shown in the picture:
Select the following packages:
- zlib
- openssh
- openssl
- perl
- subversion-perl (if you want to use git-svn)
- curl
- libcurl-devel
- expat
- tcltk
- make
- gcc
- ncurses (if you want to use the clear command)
- python
Click “Next” to download and install. After installation, check the option to add an icon to the Start menu.
Installing Git
Open Cygwin bash shell (Start –> All Programs -> Cygwin -> Cygwin Bash Shell) and type the following commands to download and install Git source package:
cd /usr/src curl -O http://kernel.org/pub/software/scm/git/git-1.7.0.tar.gz tar xzvf git-1.7.0.tar.gz cd git-1.7.0 ./configure --prefix=/usr/local make make install cd .. which git
You should see /usr/local/bin/git.
Next, download and install the Git man pages:
curl -O http://www.kernel.org/pub/software/scm/git/git-manpages-1.7.0.tar.gz mkdir /usr/local/man tar xvf git-manpages-1.7.0.tar.gz -C /usr/local/man
That’s all. In the next article I’ll write about how to configure Git to integrate with tools like Notepad++ and Beyond Compare.
Your description of msysGit is misleading. At best. Of course you can use current Git. You just have to install the msysGit netinstaller. This is described very well on the Wiki pages, and I have no idea how you could possibly have missed it.
@Dscho
Your right, don’t know how I missed that, but since I’m a Cygwin user it was a natural choice for me to use Git on Cygwin. I’ll update the article as soon as possible. Thanks.
Pingback: Eduardo Laranjeira » How to configure Git on Windows
Pingback: How to configure Git on Windows
@Dscho
Can you give a link where it is written that the mysysgit netinstaller enables me to download the latest release? I work on windows and do not know how to stay uptodate.
Sorry for the delay, you can find what you are looking for here. I hope that helps.
hai, m getting this error while installing Cygwin
make: Makefile:222: fork: Resource temporarily unavailable
. Plaz give me a solution to it
Great post, very clear instructions. Thanks a bunch.
Hi Gohain, sorry for taking too long to replay. If you are trying to install Git on windows, I strongly advise you to use msysgit instead. It’s what I’m currently using, and it’s the best option available that I know. You can download the last version from: http://code.google.com/p/msysgit/downloads/detail?name=Git-1.7.7.1-preview20111027.exe&can=2&q=