//
you're reading...
git

Git on Windows

I thought I might document the process of how I installed Git on my Windows notebook, in case I need it for future reference. Or perhaps someone else might find it of interest.

Installing cygwin

First of all, you will need a copy of cygwin. For those that aren’t familiar with it, cygwin will provide a Linux-like environment for those of us running Windows. Download it here and run the setup. Feel free to accept the default options 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.

Select the following packages for installation:

  • curl
  • expat
  • gcc
  • libcurl-devel
  • make
  • ncurses
  • openssh
  • openssl
  • perl
  • python
  • tcltk
  • zlib

Click Next to download and install the selected packages. After the installation completes, check the options to add icons in the Start Menu and on the desktop.

Installing Git

Open the cygwin bash shell (either by going through the Start Menu, or from the desktop) and type the following commands to download the git source package, compile it, and install it.

cd /usr/src
curl -O http://kernel.org/pub/software/scm/git/git-1.7.0.tar.gz
tar zxvf git-1.7.0.tar.gz
cd git-1.7.0
./configure --prefix=/usr/local
make
make install
cd
which git

You should see that git is now located in /usr/local/bin/git.

Now that git is installed, take a moment to install the manpages as well:

curl -O http://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

And there we go. You should now have both git and its manpages installed. Obviously, this is only one way of many to get git on your machine. If anyone has any comments or questions, feel free to let me know. :)

Advertisement

Discussion

2 Responses to “Git on Windows”

  1. Ever heard of msysGit ?
    http://code.google.com/p/msysgit/

    Posted by Stefan Naewe | July 7, 2010, 11:40 pm
  2. Stefan,

    Yes, I’ve heard of msysGit. But I also like cygwin for a few other reasons besides just a way to install git: I prefer a bash shell to the Windows command shell, and I also have (optional) installations of tools like vim and mutt.

    Posted by Sean Cull | July 8, 2010, 1:16 am

Categories

Archives

Follow

Get every new post delivered to your Inbox.