How to Install Git 2.29 on CentOS/RHEL 7/6, Fedora 32/31

Channel: Linux
Abstract: Debian & LinuxMint This tutorial will help you to install git 2.29 on CentOS/RHEL 7/6 and Fedora 32/31/30/29/28/27 operating systems using the source

Git has released 2.29 version on Oct 19, 2020. Git is a free and open-source distributed version control system. It is designed to handle small to very large projects with speed and efficiency. To read more details and changes about Git 2.29 read release notes. If you are using a Git repository for your development, then you must require a git client on your system and you need to install git client on your workstation system.

  • Install Git on Ubuntu, Debian & LinuxMint

This tutorial will help you to install git 2.29 on CentOS/RHEL 7/6 and Fedora 32/31/30/29/28/27 operating systems using the source code. For beginners visit Git console on your browser and learn Git uses and command-line tips.

Step 1 – Prerequisites

Before installing Git from source code, make sure you have already installed the required packages on your system. If not use the following command to install the required packages.

yum install curl-devel expat-devel gettext-devel openssl-devel zlib-devel 
yum install gcc perl-ExtUtils-MakeMaker 
Step 2 – Install Git on CentOS & Fedora

Download latest Git source code from kernel git or simply use following command to download Git 2.29.0.

cd /usr/src 
wget https://mirrors.edge.kernel.org/pub/software/scm/git/git-2.29.0.tar.gz 
tar xzf git-2.29.0.tar.gz 

After downloading and extracting Git source code, Use the following command to compile the source code.

cd git-2.29.0 
make prefix=/usr/local/git all 
make prefix=/usr/local/git install 
Step 3 – Setup Environment

After installation of git client. Now you just need to set binary in the system environment. Set the PATH variable with newly installed git binary in /etc/bashrc by executing below command. Also, reload the changes in the current environment.

echo 'export PATH=/usr/local/git/bin:$PATH' >> /etc/bashrc 
source /etc/bashrc 

After completing the steps. Let’s use the following command to check the current git version.

git --version 

git version 2.25.0

Git has been successfully installed on your system. Next, you can visit our Git tutorials section to read more about.

Conclusion

Its good to have your software’s up to date. In this tutorial, you have instructions to install Latest git on CentOS 7/6 and Fedora Linux systems.

Ref From: tecadmin

Related articles