Logo Questions Linux Laravel Mysql Ubuntu Git Menu

how to install latest git using apt-get?





I installed git using sudo apt upgrade git but it only installed 1.9.1 version even though the latest git available is 2.11.0.

When I tried running apt-cache policy git, I got the following

$apt-cache policy git
  Installed: 1:1.9.1-1ubuntu0.3
  Candidate: 1:1.9.1-1ubuntu0.3
  Version table:
 *** 1:1.9.1-1ubuntu0.3 0
        500 http://archive.ubuntu.com/ubuntu/ trusty-updates/main amd64 Packages
        500 http://security.ubuntu.com/ubuntu/ trusty-security/main amd64 Packages
        100 /var/lib/dpkg/status
     1:1.9.1-1 0
        500 http://archive.ubuntu.com/ubuntu/ trusty/main amd64 Packages
like image 750
Aravind Yarram Avatar asked Mar 11 '23 08:03

Aravind Yarram

1 Answers

Just try it:

sudo add-apt-repository ppa:git-core/ppa
sudo apt-get update
sudo apt-get install git
like image 137
Rubaiyat Jahan Mumu Avatar answered Mar 12 '23 21:03

Rubaiyat Jahan Mumu