CentOS6.6 source code installation git-2.3.0
(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
Sudoyum install curl-devel expat-devel gettext-devel openssl-devel zlib-devel gccperl-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"