Centos 7 upgrade/install git 2.7.3
1. Install the required software package
# yum install curl-devel expat-devel gettext-devel openssl-devel zlib-devel # yum install gcc perl-ExtUtils-MakeMaker
2. Download and install
# cd /usr/src# wget https://www.kernel.org/pub/software/scm/git/git-2.7.3.tar.gz# tar xzf git-2.7.0.tar.gz
# cd git-2.7.0# make prefix=/usr/local/git all# make prefix=/usr/local/git install# echo "export PATH=$PATH:/usr/local/git/bin" >> /etc/bashrc# source /etc/bashrc
3. Check the version
# git --version
O. Others
Centos comes with Git, and 7.x comes with git 1.8.3.1 (which should be, or may not). you need to use it before installing the new version.yun remove git
Uninstall (you can also uninstall it after installation ).
Runmake prefix=/usr/local/git all
Error may be reported: make: * [git-credential-store] Error 1. You can use the following command to replace
# ./configure --without-iconv# make CFLAGS=-liconv prefix=/usr/local/git all# make CFLAGS=-liconv prefix=/usr/local/git install