--If you install Git as a package (yum install git, etc.) on Linux (not limited to Linux), only the old one will be included. --Describe how to install the latest version in a form that is easy to upgrade (others have written the same, but for easy reference). --Reference site - http://www.task-notes.com/entry/20150622/1434942000
#If you do not set the time in advance, an error may occur.
#Install dependent libraries
sudo yum -y install curl-devel expat-devel gettext-devel openssl-devel zlib-devel perl-ExtUtils-MakeMaker gcc
#Install Git (this time I will uninstall the git I put in here later)
sudo yum -y install git
#Switch to root
sudo su -
#All the following work is done as root.
#Move to source directory
cd /usr/local/src/
#Install the publicly available git source (I installed Git above for this task)
git clone git://git.kernel.org/pub/scm/git/git.git
#Uninstall git with package installation
yum remove git
#Directory move
cd git
#make
make prefix=/usr/local all
make prefix=/usr/local install
After that, every time the latest version is released, you can update to the latest version by doing git pull and make ~.
Recommended Posts