Git is a open source and cross platform application for distributed version control system and is used by majority of developers nowadays. It allows you to keep track of your code changes, revert changes, create branches and to collaborate with in large or small development teams. So, in this article, we will walk you through each step on how to install GIT on Ubuntu 18.04.
Prerequisites
Before continuing with this tutorial, make sure you are logged in as a user with sudo permissions.
Installing Git
The easiest way to install Git is to install it using the apt package management tool from the Ubuntu’s default repositories.
- First of all need to update apt package using following command:
sudo apt update
- Now Install Git using command given below:
sudo apt install git
- Now Verifying installation using following command:
git --version output: version 2.9.1
Configuring Git
Now that you have Git installed and to prevent warnings, you should configure it with your information.
git config --global user.name "Your Name"
git config --global user.email "youremail@domain.com"
To verify the configuration changes you can use the following command:
git config --list
You have learned how to install Git on your Ubuntu Please feel free to comment if you are facing issue following this guide.