Saturday, September 19, 2020

How to Install Git on CentOS 8 Linux Operating System

Must read

How to Install Node.js and NPM on Debian 10 Linux

The Node.js is the very well-known JavaScript runtime environment used to JavaScript code server-side execution. It is an Open-source, cross-platform supported environment....

How to Deploy Rocket.Chat on Debian 10 Linux

Rocket.Chat is a very popular open-source team communication system; it is famous as an alternative to Slack. It provides various features along...

How to Install Tomcat 9 on Ubuntu 20.04 Operating System

The Apache Tomcat software is an open source implementation of the Java Servlet, JavaServer Pages, Java Expression Language and Java WebSocket technologies. Apache...

How to Install Docker on Ubuntu 20.04 Linux

Docker is an application use to simplify the application management process in containers, where containers use to run the application with the...
SATISH KUMAR
I am Satish Kumar, Founder of LinuxConcept. Linux and F.O.S.S enthusiast, love to work on open source platform and technologies.

In this tutorial will learn how to install and configure Git on CentOS 8.

Nowadays, Git is a very famous version control system used by most of the open-source and commercial projects. It allows us to track code changes, revert into the previous stage of a project, and work with multiple branches and easy to collaborate with your fellow developers.

Git is designed and developed by Linus Torvalds, who has created Linux kernel.

At the time of writing this article, the CentOS 8 repository has Git 1.8.3 version, which is outdated today.

If you want to install the most recent version of Git (v2.22.0) with yum package manager, you need to use Wandisco repositories.

One of another option to install the latest version of Git is to install with source, where you need to use Source file of git to build and install, but the drawback is you will not be able to maintain your Git installation through the yum package manager.

Prerequisites

To install Git into CentOS 8, make sure you have a CentOS 8 running system with a user login who has sudo privileges.

Install Git

Follow below-mentioned steps to install Git into CentOS 8:
Step 1 – Enable Wandisco repository
 
To install Latest Git through yum package manager first need to enable Wandisco Git Repository.
 
To allow wandisco to the repository, you need to create a new repository under the /etc/yum.repos.d/ directory, as we have created a new repository file with the name wandisco-git.repo with below content:
[wandisco-git]
name=Wandisco GIT Repository
baseurl=http://opensource.wandisco.com/centos/6/git/$basearch/
enabled=1
gpgcheck=1
gpgkey=http://opensource.wandisco.com/RPM-GPG-KEY-WANdisco

Now, import the repository GPG keys with:

$ sudo rpm --import http://opensource.wandisco.com/RPM-GPG-Key-WANdisco
Step 2 – Install Git into CentOS 8
 
Now you can install Git into CentOS 8 by using the following command:
$ sudo yum install git
Step 3 – Check Git Version or Verify Installation
 
To verify any package on Linux, you can check the install version of that package or tools; you can verify installed Git by using the following command:
$ git --version
Output:

git version 2.22.0

The above output is shown us we have successfully installed Git version 2.22.0 on CentOS 8 Linux system.

Step 4 – The basic configuration of Git
 
Now you need to configure username and email ID for Git commit process, which you can configure as shown below:
$ git config --global user.name “Your Username”
$ git config --global user.email “Your Email ID”

After configuring the username and email, you can verify the setting configured properly or not using the following command:

$ git config --list
Output:

user.name="satish"
user.email="[email protected]"

The above configuration saved into ~/.gitconfig file, which you can change manually also in future.

[user]
	name = "satish"
	email = "[email protected]"

Conclusion

Now you have learned how to install Git on CentOS 8 Operating System. To learn more about Git (Version Control System), you can check the Pro Git book where all details are available about Git Version Control.

If you get any problem while installing Git into your system or have any feedback, feel free leave a comment below.

- Advertisement -

More articles

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Latest article

How to Install Node.js and NPM on Debian 10 Linux

The Node.js is the very well-known JavaScript runtime environment used to JavaScript code server-side execution. It is an Open-source, cross-platform supported environment....

How to Deploy Rocket.Chat on Debian 10 Linux

Rocket.Chat is a very popular open-source team communication system; it is famous as an alternative to Slack. It provides various features along...

How to Install Tomcat 9 on Ubuntu 20.04 Operating System

The Apache Tomcat software is an open source implementation of the Java Servlet, JavaServer Pages, Java Expression Language and Java WebSocket technologies. Apache...

How to Install Docker on Ubuntu 20.04 Linux

Docker is an application use to simplify the application management process in containers, where containers use to run the application with the...

How To Set Up Nginx Server Blocks on Debian 10 Linux

Nginx Server Block is use to configure and run more than one website or web application on a single server/system. The Nginx Server...