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

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

Data Engineeer, Business Analytics, Web Developer, Library Technology specialising in PHP and Tableau

Based in Melbourne, Australia

Feel free to contact me or _justin_kelly