Thursday, 14 November 2013

Git manual installation tutorial

Disclamer :
I assume, you are using Ubuntu as Linux distribution. For information, my version is Ubuntu 13.04. And Java is already installed on your machine.
>java -version
java version "1.7.0_40"
Java(TM) SE Runtime Environment (build 1.7.0_40-b43)
Java HotSpot(TM) Server VM (build 24.0-b56, mixed mode)

Step 1 :
Run a complete Git installation through the standard command line :
>sudo apt-get install git

It installs Git 1.8.3.2.



Test your installation by typing :
>git --version 
git version 1.8.3.2

Now you have Git ready to run but this is not the latest release so you have to install it manually or use the standard version.

Step 2 :
Download Git latest release via Git website.

Using wget on the  Git download page.
>wget http://kernel.org/pub/software/scm/git/git-1.8.5.1.tar.gz
tar -xvf git-1.8.5.1.tar.gz

Or using, git command line in a terminal, please paste the line
>git clone https://github.com/git/git

Step 3 :
You have full detailed documentation of how to install Git on your linux computer in the file INSTALL at the git root directory.

This is a quick summary :

>cd git-1.8.5.1/
>sudo apt-get install libssl-dev libcurl4-gnutls-dev libz-dev libexpat1-dev gettext  
>make prefix=/usr/local all
>sudo make prefix=/usr/local install
>which git
/usr/local/bin/git
>git --version
git version 1.8.5.1

No comments :

Post a Comment