Install and Configure Git on Linux Mint 20 - Step by step guide ?

Git is a free and open-source distributed version control system created to manage everything from small to massive projects with speed and efficiency. It is a software that is designed to keep track of changes in files, usually used for work collaborations among programmers developing source code during software development. Git can be installed on the most common operating systems like Windows, Mac, and Linux.

Here at LinuxAPT, you will learn how to install Git on your Linux Mint distribution. Also, you will see how to configure git so that it can interact with GitLab. GitLab is an open-source DevOps platform that allows the user to develop, secure, and operate software in a single application.


Steps to Install Git on Linux Mint 20 

1. Perform System Update

To begin, we need to start with updating and upgrading the packages that already exist on our system. To update the packages, run the below command with sudo:

$ sudo apt update

Next, run the upgrade command with sudo:

$ sudo apt upgrade


2. Install Git on the system

Once all the packages are successfully upgraded, we will run a command to install Git. To do this, run the below command:

$ sudo apt install git

You will have to type Y and hit enter to continue the installation process.


3. Verify Git Installation

After the installation is completed, you need to check if git is now installed on your system or not. Run the git version command to verify if git exists. This will also tell you the version number of the git you just installed on your system:

$ git --version


How to configure Git software on the system ?

1. Set Global Username

Following the command syntax mentioned below, set a username that will be needed while committing changes on the Git repository:

$ git config --global user.name "Your name"


2. Set Global User Email

Next, set the user email that will also be required to commit changes on the Git repository. To do that, use this command syntax:

$ git config --global user.email "Your Email"


3. Verify username and email

When you will run the command mentioned below, it will show you the username and email that you just set in the previous steps:

$ git config --list


[Need help in fixing Linux system issues ? We can help you. ]

This article covers the complete installation process for Git on Linux Mint 20.

To verify Git installation, run the below command:

$ git --version

Related Posts