(1) add the rpmforge source wgethttp: // response
(1) add the rpmforge source
Wget http://pkgs.repoforge.org/rpmforge-release/rpmforge-release-0.5.3-1.el6.rf.i686.rpm
Sudo rpm -- import http://apt.sw.be/RPM-GPG-KEY.dag.txt
Sudo rpm-I rpmforge-release-0.5.3-1.el6.rf.i686.rpm
(2) install dependent packages
Sudo yum update
Sudo yum install curl-devel expat-devel gettext-devel openssl-devel zlib-devel gcc perl-ExtUtils-MakeMaker
(3) download and decompress the git source code
Wget https://www.kernel.org/pub/software/scm/git/git-2.3.0.tar.gz
Tar-zxvf git-2.3.0.tar.gz
Cd git-2.3.0
(4) compile and install
Make prefix =/usr/local/git all
Sudo make prefix =/usr/local/git install
(5) add the git installation PATH to the PATH variable
Sudo vim/etc/bashrc
Add export PATH =/usr/local/git/bin: $ PATH in the last row to save and exit
(6) verify whether the installation is successful
Source/etc/bashrc
Git -- version
(7) configure git
Git config -- global user. name "username"
Git config-global user. email "user@mail.com"