Skip to content

Instantly share code, notes, and snippets.

@materro
Last active December 27, 2022 11:52
Show Gist options
  • Select an option

  • Save materro/914560d281d49ee252d445b9cf8650ac to your computer and use it in GitHub Desktop.

Select an option

Save materro/914560d281d49ee252d445b9cf8650ac to your computer and use it in GitHub Desktop.
Install newer version of Git on Ubuntu Focal

Step by step guide for installing newer version of Git on Ubuntu Focal 20.04

1. Check current version

$ git --version
git version 2.25.1

2. Add git-core repository to package manager

sudo echo 'deb http://ppa.launchpad.net/git-core/ppa/ubuntu focal main' > /etc/apt/sources.list.d/git-core.list

3. Add pubkey

sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys A1715D88E1DF1F24

👉 gpg: key A1715D88E1DF1F24: public key "Launchpad PPA for Ubuntu Git Maintainers" imported

4. Update packages list and install new version of Git

sudo apt-get update
sudo apt-get install -y git

5. Check newer version

$ git --version
git version 2.39.0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment