michi kan
michi kan

Reputation: 51

How do I update git to the latest version?

I am using git version 2.1.4 on GCE.

$ git --version
git version 2.1.4

I would like to update to the latest version, but it was not updated when I executed the following command.

sudo add-apt-repository ppa:git-core/ppa
sudo apt-get update
sudo apt-get upgrade

Is my way wrong?


After that,I tried the following but it got an error.

sudo add-apt-repository ppa:git-core/ppa
sudo apt-get update

The following error has occurred.

W: ppa.launchpad.net/git-core/candidate/ubuntu/dists/jessie/mai‌​n/… 404 Not Found
W: ppa.launchpad.net/git-core/ppa/ubuntu/dists/jessie/main/… 404 Not Found

I found out how to fix with Ubuntu, but do you know how to fix GCE (debian)?

Upvotes: 2

Views: 2694

Answers (2)

Kodali444
Kodali444

Reputation: 1443

In ubuntu 16.04 the following worked for me. before running the below commands my git version is 2.7, now it's the latest version

sudo add-apt-repository -y ppa:git-core/ppa
sudo apt-get update
sudo apt-get install git -y

Upvotes: 0

Edmund Dipple
Edmund Dipple

Reputation: 2434

Add the Git Maintainers repository to get the latest Git version.

sudo add-apt-repository ppa:git-core/ppa
sudo apt-get update
sudo apt-get install git

Upvotes: 6

Related Questions