Install Git on Ubuntu 22.04

Install Git on Ubuntu 22.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 22.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-jammy.list

Leave a Comment

Cancel reply

Your email address will not be published.