Justin Kelly various ramblings

Install Git in your home directory :: How to

If you every need to install Git on a server but don’t have root access, follow the below steps to install Git in your home directory

check that you can run gcc – if you get errors then you got to figure something else out

gcc --version

prep your home folder

mkdir ~/src
cd ~/src

make the ~/opt directory – this is where we will install git into

mkdir ~/opt

Get the git source from google code is the latest at the moment and untar

wget http://git-core.googlecode.com/files/git-
tar -xvzf git-
cd git-

run ./configure and tell it to use ~/opt

./configure --prefix=$HOME/opt

now do the install

make install

check git is happy

~/opt/bin/git --version

If it prints out ‘git version’ then its all good to go – git is now installed in your home folder