Created
April 8, 2012 19:28
-
-
Save tony19/2339467 to your computer and use it in GitHub Desktop.
Install newest git on Ubuntu 11.10
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Thanks :)