Skip to content

Instantly share code, notes, and snippets.

@LeeiFrankJaw
Last active February 23, 2020 13:37
Show Gist options
  • Save LeeiFrankJaw/3772766beae1b0d8db871dee885d8bb9 to your computer and use it in GitHub Desktop.
Save LeeiFrankJaw/3772766beae1b0d8db871dee885d8bb9 to your computer and use it in GitHub Desktop.
Install git from source under Ubuntu 18.04
sudo apt install git
git clone git@github.com:git/git.git
cd git/
git checkout v2.15.1
sudo apt install libcurl4-openssl-dev
make configure
./configure --prefix=/usr/local # --without-tcltk
make all man
# make NO_GETTEXT=yes all man
make install install-man
sudo apt purge git
# Or you can keep the package version of git and it should be shadowed
# by the version you compiled.
# Prevent the completion file from being overwritten by the package update.
# sudo dpkg-divert --divert /usr/share/bash-completion/completions/git~ \
# --add /usr/share/bash-completion/completions/git
# Bash completion for git
sudo cp contrib/completion/git-completion.bash \
/usr/share/bash-completion/completions/git
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment