Here is how to install git on your Ubuntu 20.04 system in under two minutes:
Step 1 - Update the package list on your system
The first step is to update the package list on your system before proceeding to actual installation:
sudo apt update -y
apt update downloads the package lists from the repositories and updates
them to get information on the newest versions of packages and their
dependencies. It will do this for all repositories and PPAs.
Step 2 - Install git package
Now, install git package by running the following command:
sudo apt-get install git
Step 3 - Verify installation and setup username
To verify the git installation, run the following command:
This will print the git version.
Configure your git username and email using the following commands, replacing
My Name name with your own. These details will be associated with any commits
that you create:
git config --global user.name "My Name" git config --global user.email "[email protected]"
We call you when your
website goes down
Get notified with a radically better
infrastructure monitoring platform.