Git is the most popular version control system. It is designed to handle a small to very large projects with speed and efficiency. Git is a free and open source distributed version control system.
This article will guide you to install Git on CentOS/RHEL 6 Systems using source code.
Step 1: Install Required Packages
Before compiling Git from source code, make sure you have installed required packages on your system or Use following command to install it.
# yum install curl-devel expat-devel gettext-devel openssl-devel zlib-devel
Step 2: Download and Compile Git Source
Download latest Git source code from Git google code or simply use following command to download Git 18.104.22.168.
# cd /usr/src # wget https://git-core.googlecode.com/files/git-22.214.171.124.tar.gz # tar xzf git-126.96.36.199.tar.gz
After downloading and extracting Git source code, Use following command to compile source code.
# cd git-188.8.131.52 # make prefix=
/usr/src/gitall # make prefix= /usr/src/gitinstall # echo "export PATH=$PATH: /usr/src/git/bin" >> /etc/bashrc # source /etc/bashrc
Step 3. Check Git Version
One completion of above steps, you have successfully install Git in your system. Let use following command to check git version
# git --version git version 184.108.40.206