

Now your Git is installed on your CentOS machine and you need to configure it by setting up email address and username: git config -global user.name "Your Name" git config -global user.email forget to replace with your real name and email address. To update the version you should repeat the process of download and extract latest files. You can verify it by typing: git -version git version 2.24.1 Next, compile and install Git on your CentOS system using below commands: sudo make prefix=/usr/local all sudo make prefix=/usr/local install sudo wget Īfter that, extract the file put to the git source directory by typing: sudo tar -xf cd git-*

Type below command with last copied URL link to download latest tar.gz file of git.

So go to that directory using below command: cd /usr/src/ Let’s use following command to check current git version.Common location to store the Git source is /usr/src directory. Now execute below command to reload configuration in current environment.Īfter completing above steps. So edit /etc/bashrc file and add below content to it Now you must need to set binary in the system environment. Step 2 – Download and Install Git 2.9.5(One of the latest)ĭownload latest Git source code from kernel git or simply use following command to download Git 2.14.0.Īfter downloading and extracting Git source code, Use the following command to compile the source code.Īfter installation of git client. # yum install gcc perl-ExtUtils-MakeMaker # yum install curl-devel expat-devel gettext-devel openssl-devel zlib-devel If not use the following command to install required packages. This tutorial will help you to install git 2.9.5 on CentOS/RHEL 7/6/5 and Fedora 26/25/24 operating systems using the source code.īefore installing Git from source code, make sure you have already installed required packages on your system.
