In software development, Git is a distributed revision control and source code management (SCM) system with an emphasis on speed. Git was initially designed and developed by Linus Torvalds for Linux kernel development in 2005. It’s all the rage right now with sites like GitHub offering a social coding experience, and popular projects such as Perl, Ruby on Rails, and the Linux kernel using it.

log in as root or another user with sudo access. First, you need to install a few dependencies Git needs:

 # yum -y install zlib-devel openssl-devel cpio expat-devel gettext-devel

Next, change directories to /usr/local/src, download the latest Git source code and untar it, and then change into your newly created directory:

 # cd /usr/local/src

# wget http://git-core.googlecode.com/files/git-1.7.9.tar.gz

# tar xvzf git-1.7.9.tar.gz

# cd git-1.7.9

Now configure a makefile for the system, compile the code and install it:

 # ./configure

# make

# make install

And last, to make sure installation is a success. Change to home directory, create a new directory, and initialize it as a Git repository:

 # cd

# mkdir git-test

# cd git-test

# git init

You should see similar output:

Initialized empty Git repository in /root/git-test/.git/

 

Leave a Reply

Your email address will not be published. Required fields are marked *