0

I have checked this answer and followed the same steps.

My system throws

git is already the newest version.

But when i do git --version it shows

git version 1.8.1.2

I need to install git >= 1.9.4.

I have several tutorials and all of them are suggesting above method but it doesn't work.

Edit:

Output of apt-cache policy git

git:
  Installed: 1:2.4.6-0ppa1~ubuntu14.04.1
  Candidate: 1:2.4.6-0ppa1~ubuntu14.04.1
  Version table:
 *** 1:2.4.6-0ppa1~ubuntu14.04.1 0
        500 http://ppa.launchpad.net/git-core/ppa/ubuntu/ trusty/main amd64 Packages
        100 /var/lib/dpkg/status
     1:1.9.1-1ubuntu0.1 0
        500 http://in.archive.ubuntu.com/ubuntu/ trusty-updates/main amd64 Packages
        500 http://security.ubuntu.com/ubuntu/ trusty-security/main amd64 Packages
     1:1.9.1-1 0
        500 http://in.archive.ubuntu.com/ubuntu/ trusty/main amd64 Packages
     1:1.8.3.2-1 0
        500 http://us.archive.ubuntu.com/ubuntu/ saucy/main amd64 Packages

which git gives

/usr/local/bin/git

1 Answers1

1

The latest version in Trusty is 1.9.1. To install 2.1.4 you need Vivid. To get version 2.4.6 you have to wait for Wily.

To install packages from this PPA you need at least Lucid.

Based on the output of

apt-cache policy git

you have installed version 2.4 6

I assume, either you don't use /usr/bin/git or the file was overwritten.

To resolve the first point, check the output of which git

If the output isn't /usr/bin/git, remove the file, because you want to use the binary from the git package.

sudo rm /usr/local/bin/git

and for the second point

sudo apt-get install -reinstall git
A.B.
  • 90,397