Skip to content

Instantly share code, notes, and snippets.

@tony19
Created April 8, 2012 19:28
Show Gist options
  • Save tony19/2339467 to your computer and use it in GitHub Desktop.
Save tony19/2339467 to your computer and use it in GitHub Desktop.
Install newest git on Ubuntu 11.10
#!/bin/sh
# Ubuntu 11.10 currently comes with Git 1.7.2. If you want to install
# the latest dev build of Git, follow these steps. One feature I really
# needed from this is the ability to stash unstaged *and untracked*
# changes. (Current version only stashes unstaged changes)
sudo apt-get install libssl-dev libcurl4-gnutls-dev libexpat1-dev
git clone git://git.kernel.org/pub/scm/git/git.git
git tag
# checkout the version you want
git checkout v1.7.9.6
make prefix=/usr/local
sudo make prefix=/usr/local install
# Even after uninstalling old git, Ubuntu wanted to run /usr/bin/git even
# though /usr/local/bin/git existed. Compensate by symlinking...
sudo ln -s /usr/local/bin/git /usr/bin/git
@SpekkoRice
Copy link

Thanks :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment