I've just set up a new machine with Ubuntu Oneiric 11.10 and then run
Wget dpkg -i gitkraken-amd64.deb. LibXss.so.1 dnf install libXScrnSaver dnf check-update dnf upgrade.
Now if I run
git --version
it tells me I have git version 1.7.5.4
but on my local machine I have the much newer git version 1.7.9.2
I know I can install from source to get the newest version, but I thought that it was a good idea to use the package manager as much as possible to keep everything standardized.
So is it possible to use
Jeff Schaller♦apt-get
to get a newer version of git
, and what is the right way to do it?47.1k1111 gold badges6868 silver badges154154 bronze badges
cwdcwd14.7k5656 gold badges119119 silver badges159159 bronze badges
5 Answers
You have several options:
- Either wait until the version you need is present in the repository you use.
- Compile your own version and create a
deb
. - Find a repository that provides the version you need for your version of your distribution(e.g. Git PPA).
- If you don't need any particular feature from the newer version, stay with the old one.
If a newer version is available in the repositories you use, then
apt-get update && apt-get upgrade
(as root) updates to the latest available version.For those who don't know what a PPA is, link
MarcoMarco26k77 gold badges8585 silver badges121121 bronze badges
Here are the commands you need to run, if you just want to get it done:
As of Dec 2018, I got git 2.20.1 that way, while the version in the Ubuntu Xenial repositories was 2.7.4.
If your system doesn't have
Dan DascalescuDan Dascalescuadd-apt-repository
, you can install it via:2,92022 gold badges1212 silver badges1919 bronze badges
Doing a search for 'git ppa' gives Git stable releases. See instructions for installing here. You can also install the package by downloading directly from the web page, and installing with
Faheem MithaFaheem Mithadpkg -i
.23.7k1818 gold badges8787 silver badges139139 bronze badges
To update git on Ubuntu 12.04 just follow this line of commands:
techraf
4,3431010 gold badges2323 silver badges4343 bronze badges
alabi temitopealabi temitope
You can do this by homebrew in the easiest way:
install homebrew:
upgrade git:
Community♦
Masih SadriMasih Sadri