How to Install Git On Ubuntu 20.04 - TechvBlogs

How to Install Git On Ubuntu 20.04

Git is the world's most popular distributed version control system used by many open-source and commercial projects. It allows you to collaborate on projects with your fellow developers, keep track of your code changes, revert to previous stages, create branches, and more. Linus Torvalds (the creator of Linux) developed Git.


Smit Pipaliya - Author - TechvBlogs
Smit Pipaliya
 

2 years ago

TechvBlogs - Google News

Introduction

Git is the world's most popular distributed version control system used by many open-source and commercial projects. It allows you to collaborate on projects with your fellow developers, keep track of your code changes, revert to previous stages, create branches, and more. Linus Torvalds (the creator of Linux) developed Git.

A version control system is a system that keeps a record of the changes in a file (or multiple files) over a period. This is so that a user may return to a previous version of the system's software whenever necessary. This article shows you how to install and configure Git in Ubuntu 20.04 LTS.

In this article, you will learn how to install and configure Git on Ubuntu 20.04 via the Command line.

1. Prerequisites

  • The operating system running Ubuntu 20.04 Linux
  • A root or non-root user with Sudo privileges
  • Has stable internet connection
  • Terminal window / Command line

2. Update Local Repositories

Update all system packages to the latest, Run the following command:

sudo apt-get update
sudo apt-get upgrade -y

How to Install Git On Ubuntu 20.04 - TechvBlogs

Read Also: Upload Files and Images with Validation in Laravel

3. Install GIT

The Git utility package is available in ubuntu software sources, which can be installed by APT-GET. Run the following command:

sudo apt-get install git

How to Install Git On Ubuntu 20.04 - TechvBlogs 

Type Y for Yes and press Enter.

4. Check GIT Version

Verify the installation, run the following command:

git --version

How to Install Git On Ubuntu 20.04 - TechvBlogs

That’s it, you have successfully installed Git on your Ubuntu, and you can start using it.

5. Configure GIT

Set your global user name and email. Run the following command:

git config --global user.name "<YOUR NAME>"
git config --global user.email "<YOUR EMAIL ADDRESS>"

How to Install Git On Ubuntu 20.04 - TechvBlogs

You can verify the configuration changes, run the following command:

git config --list

How to Install Git On Ubuntu 20.04 - TechvBlogs

The configuration settings are stored in the ~/.gitconfig file:

How to Install Git On Ubuntu 20.04 - TechvBlogs

Thank you for reading this blog.

If you want to manage your VPS / VM Server without touching the command line go and  Checkout this linkServerAvatar allows you to quickly set up WordPress or Custom PHP websites on VPS / VM in a  matter of minutes.  You can host multiple websites on a single VPS / VM, configure SSL certificates, and monitor the health of your server without ever touching the command line interface.

Read Also: How to Install MongoDB on Ubuntu 20.04

If you have any queries or doubts about this topic please feel free to contact us. We will try to reach you.

Comments (0)

Comment


Note: All Input Fields are required.