如何在 Ubuntu Hardy 上升级 Git?

And*_*rew 23 git ubuntu

我安装了 Git 版本 1.5.4.3,但我认为这一定是旧版本。我正在运行 Ubuntu Hardy 8.04。我需要至少安装 1.6 版才能让 Git GUI 工作。如何升级我的安装?

更新:我设法升级了我的 Git 安装,但我也意识到我的 Ubuntu 版本很旧,所以我升级到最新版本,这会自动让我访问更新的软件包(包括 Git)。

小智 23

I used the PPA for Ubuntu Git Maintainers to update Git from 1.5.4.3 on Hardy to 1.6.5.2. No compiling, just add another entry to your sources list, apt-get update and you're good to go.

https://launchpad.net/~git-core/+archive/ppa
Run Code Online (Sandbox Code Playgroud)

More info on the page (Technical details > Read about installing).

Or just run:

sudo apt-get install python-software-properties
sudo add-apt-repository ppa:git-core/ppa
sudo apt-get update
sudo apt-get install git
Run Code Online (Sandbox Code Playgroud)


Aru*_*rul 19

在 ubuntu 中将 git 更新到较新版本

sudo add-apt-repository ppa:git-core/ppa
sudo apt-get update
sudo apt-get install git
Run Code Online (Sandbox Code Playgroud)

我正在使用 ubuntu 10.04.2 Lucid

  • 如果`add-apt-repository` 不起作用,可能需要先`sudo apt-get install python-software-properties`。 (4认同)

And*_*rew 7

本教程对我很有用。这是你应该做的:

Git 网站下载最新版本到您的主目录并解压。

打开终端并输入以下命令(一次一个):

sudo apt-get remove git git-svn
sudo apt-get build-dep git-core
cd git-1.6.5/ (or whatever version you downloaded and extracted)
./configure
make
sudo make install
Run Code Online (Sandbox Code Playgroud)

您现在应该安装了最新版本的 Git。

  • ..并且它是绕过数据包管理安装的,因此您可以自己进行未来的更新。并不是说这一切都不好 - 我只是更喜欢尽可能安装软件包而不是编译。 (2认同)