Pick our brains...

Install GIT on shared hosting

This is needed when you need GIT and the server you are using is a shared host that does not already have GIT installed globally (eg. in /etc/bin or /usr/local/bin)

Step-by-step guide

  1. First run gcc –version to make sure the compiler is installed and supports the installation.
  2. Edit the .bashrc file and insert the following two lines:
    PATH=$HOME/bin:$PATH
    export PATH
  3. To install GIT v2.5.0 locally in the home folder of the hosting account issue the following commands:
    cd ~
    source .bashrc
    mkdir src
    mkdir bin
    cd src
    wget https://github.com/git/git/tarball/v2.5.0
    tar -xzvf v2.5.0
    cd git-{whatever-src-checksum [see comment below if confused]}
    make -i NO_TCLTK=YesPlease NO_OPENSSL=YesPlease NO_CURL=YesPlease NO_EXPAT=YesPlease
    make install -i NO_TCLTK=YesPlease NO_OPENSSL=YesPlease NO_CURL=YesPlease NO_EXPAT=YesPlease
  4. Make sure GIT is now installed in the correct location by typing ls ~/bin thengit –version. If successful you should see the GIT binaries in ~/bin and the git command should function as expected with the correct version displayed.
  1. for the step:

    cd git-{whatever…}

    Just list the files in the current directory to see the git folder. Mine looked like this “git-git-8d17201”.

    Or you can just:

    cd git-[press tab to autocomplete the folder name]

  2. Go here to check for the latest git version number: https://git-scm.com/downloads

    and update the v#.#.# in the commands above