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

Pprep your home folder

mkdir ~/src
cd ~/src

Mmake 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-

Rrun ./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

Justin Kelly

Justin Kelly

Web Developer | Business Analytics | Library Technology based in Melbourne, Australia

Contact me Follow on Twitter