Skip to content

Instantly share code, notes, and snippets.

@jonathanmarvens
Forked from haf/install-git.sh
Created September 15, 2012 20:39
Show Gist options
  • Save jonathanmarvens/3729647 to your computer and use it in GitHub Desktop.
Save jonathanmarvens/3729647 to your computer and use it in GitHub Desktop.
Installing git and git-subtree from source in ubuntu as packages
# use with: curl -L https://raw.github.com/gist/3426227 | bash
# get git binary, then git with git
sudo apt-get install git -y
git clone https://github.com/git/git.git
# remove your binary/package
sudo apt-get remove git -y
sudo apt-get install make checkinstall libcurl4-gnutls-dev libexpat1-dev gettext libz-dev libssl-dev asciidoc -y
# build git & install it
cd git
make prefix=/usr/local all
sudo checkinstall --pkgname=git make prefix=/usr/local install
# build subtree & install it
cd contrib/subtree
make prefix=/usr/local
sudo checkinstall --pkgname=git-subtree make prefix=/usr/local install
sudo checkinstall --pkgname=git-subtree-doc make prefix=/usr/local install-doc
# clean up afterwards
sudo apt-get remove -y libcurl4-gnutls-dev libexpat1-dev gettext libz-dev libssl-dev asciidoc
sudo apt-get autoremove -y
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment