Install Git on Ubuntu 20.04

Git is an open-source version control system for tracking file changes. Git is commonly used by developers during the software development.

This tutorial explains how to install Git on Ubuntu 20.04.

Install Git

Add the Git repository:

sudo add-apt-repository -y ppa:git-core/ppa

Install Git:

sudo apt install -y git

After the installation is completed, we check Git version:

git --version

Uninstall Git

If you decided to completely remove Git and all related dependencies, use the following command:

sudo apt purge --autoremove -y git

Remove GPG key and repository:

sudo rm -rf /etc/apt/trusted.gpg.d/git-core_ubuntu_ppa.gpg
sudo rm -rf /etc/apt/sources.list.d/git-core-ubuntu-ppa-focal.list

Leave a Comment

Your email address will not be published. Required fields are marked *