如何在Linux上将git更新到最新版本?

Ali*_*ice 3 linux git ubuntu ubuntu-11.04

我有git版本1.7.4.1.并希望升级到1.8.4的最新稳定版本.

所以我试着sudo apt-get install gitLinuxgit下载页面上说,但我得到了这个结果:

  Reading package lists... Done
  Building dependency tree       
  Reading state information... Done
  git is already the newest version.
  0 upgraded, 0 newly installed, 0 to remove and 91 not upgraded.

$ git --version 
  git version 1.7.4.1
Run Code Online (Sandbox Code Playgroud)

我坚持使用git版本1.7.4.1!

我在Ubuntu 11.04上.

vis*_*.15 6

这是因为Ubuntu尚未在其存储库中更新软件包.解决这个问题的唯一方法是从源代码编译,您可以从https://github.com/git/git下载.

  • sudo add-apt-repository ppa:git-core/ppa -y --> sudo apt-get update --> sudo apt-get install git --> git --version (2认同)