Skip to content

Instantly share code, notes, and snippets.

@bootleq
Created September 15, 2015 12:08
Show Gist options
  • Save bootleq/0082225915fb4b866977 to your computer and use it in GitHub Desktop.
Save bootleq/0082225915fb4b866977 to your computer and use it in GitHub Desktop.
Install git from source
#!/bin/bash
if which apt-get 2>&1 >/dev/null; then
sudo apt-get install -y libcurl4-gnutls-dev libexpat1-dev gettext libz-dev libssl-dev
fi
cd ~/src
[[ ! -d git ]] && git clone https://github.com/git/git --depth 10
cd git
git fetch origin v2.5.0 --depth 1
git checkout FETCH_HEAD
make prefix=/usr/local all
sudo make prefix=/usr/local install
@bootleq
Copy link
Author

bootleq commented Sep 15, 2015

This script clone git to ~/src, checkout v2.5.0 and install to /usr/local.

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