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:
git --version
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 "myemail@emailprovider.com"
Article by
Jan Tovarys
Got an article suggestion?
Let us know
Next article
[2 min installs] Anaconda on Ubuntu
→
Check Uptime, Ping, Ports, SSL and more.
Get Slack, SMS and phone incident alerts.
Easy on-call duty scheduling.
Create free status page on your domain.