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

I have git version 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:

  • Heroku: ! master -> master (non-fast-forward)
  • Django Separate local and global configuration
  • “git rebase <branch>” on git svn repo changed remote tracking destination?
  • Can git push accomplish this?
  • what happens if I stash code in one branch and change to another branch?
  • How can I associate local unversioned code to git remote repository?
  •   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

    and I’m stuck with git version!

    I am on Ubuntu 11.04.

  • Easy way to manage package.json
  • How to change repo with magit emacs?
  • Is there any easy way to .zip up my source code with Visual Studio 2013?
  • I think I don't understand git branches
  • error: library dfftpack has Fortran sources but no Fortran compiler
  • Github desktop for mac cannot login
  • 3 Solutions collect form web for “How do I update git to its latest version on Linux?”

    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

    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:

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

    You should upgrade your whole system to raring at least:

    (If you adhere to packaged version.)

    But the source will be more fresh anyway.

    Git Baby is a git and github fan, let's start git clone.