Install Git on CentOS

First you need to install any dependencies:

yum install gettext-devel expat-devel curl-devel zlib-devel openssl-devel

Then get the source code for Git

wget http://kernel.org/pub/software/scm/git/git-1.7.2.2.tar.gz

Extract the tarball

tar -zvxf git-1.7.2.2.tar.gz

Install to usr/local

cd git-1.7.2.2.tar.gz
make prefix=/usr/local all
make prefix=/usr/local install

Test it out

cd ~/
git --version

This entry was posted in Technology and tagged , . Bookmark the permalink.