Compiling and Installing GIT on windows under cygwin
Using GIT was one of the requirements of one of the project that I am doing. Here is how I installed GIT on Windows.
So What is GIT?
The supplied documentation of GIT says that:
Git is a fast, scalable, distributed revision control system with an unusually rich command set that provides both high-level operations and full access to internals.
Here is the link for the wikipedia entry.
Where can I download GIT?
Here is the link.
Before following the given steps you will need to install cygwin on your system, and add its bin directory to the system path (so that all the cygwin commands are available from inside the command prompt).
So after installing cygwin run setup.exe inside the cygwin installation folder and make sure the following modules are installed.
- gcc c anc c++ compilers
- Any other dependencies that are missing..
All these packages are located inside the Devel branch of the package tree. Required dependencies will be selected automatically.
Click next to install selected packages.
Compiling GIT form source
Untar the GIT source you downloaded using the command “tar xvzf git-1.5.5.tar.gz” .
Navigate to the untarred directory using a command prompt. Now run the “make” command inside the GIT source directory.
If it runs successfully then run “make install”.
Before running the command make sure you have Perl (language) installed. You can check it by running the command:
and then running the following inside the cpan shell:
it should show no error. I am not sure if this is the best way to do this as I am not much of a Perl guy.
So as I mentioned before you need to run the following two command to make and install Perl:
If these two steps complete successfully then your GIT is ready to go :). You can test this by running the “git” command. This command is located inside the “C:/cygwin/home/gaurav/bin”. You might to add this folder to the system path too.
Here is a cygwin version pre-configured to compile GIT. It is installed on my system and works fine. Cygwin 1.5.25 and GIT 1.5.5 are preinstalled in this archive. Just decompress this archive under folder “C:\cygwin” and add “C:\cygwin\bin” and “C:/cygwin/home/gaurav/bin” to your system path and GIT should work form any command window.
[Update:] As pointed by @Max Git is now available as a package under Cygwin which makes compilation unnecessary.