Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I update git to its latest version on Linux? [closed]

I have git version 1.7.4.1. and would like to upgrade to the latest stable release of 1.8.4.

So I tried sudo apt-get install git as it says on the git downloads page for Linux but I get this result:

  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

and I'm stuck with git version 1.7.4.1!

I am on Ubuntu 11.04.

like image 248
Alice Avatar asked Oct 13 '13 20:10

Alice


People also ask

How do I update my existing Git version?

To update git on Windows, the first possible way is to uninstall the current git version from Windows and install the latest version. However, you can also use Command Prompt to update git on Windows by executing the “git update-git-for-windows” command.

What is the latest Git version for Linux?

It is easiest to install Git on Linux using the preferred package manager of your Linux distribution. If you prefer to build from source, you can find tarballs on kernel.org. The latest version is 2.38.1.

What is Git update command?

If you have already installed Git, you can update Git with the command. git update-git-for-windows. to know the current version, use: git --version. You can run these commands in the cmd prompt .


2 Answers

There are Ubuntu PPAs for Git, offering the latest version of it. Add one of those and you'll be able to install it. For example:

https://launchpad.net/~git-core/+archive/ppa

Read the "Adding this PPA to your system" information on how to do this.

like image 44
Nikos C. Avatar answered Sep 26 '22 01:09

Nikos C.


This is due to Ubuntu has not updated the package yet in their repositories. The only way around this would be to compile from source, which you can download from https://github.com/git/git.

like image 172
vis.15 Avatar answered Sep 23 '22 01:09

vis.15