Skip to content

November 24, 2009

1

Installing Git on a Shared Host

git icon, created for the Open Icon Library

Image via Wikipedia

Git is a fantastic tool and is very useful for deployment. If you can’t install git system wide or don’t want to mess with installing it on the entire system here is an easy way to install it for a single user. This also works well on Mac OS X where installing git is more challenging than necessary. Script included

I used this script to install git on 1and1. The same script should work anywhere with no or little modification.

Preparation

Goto http://git-scm.com/download and get the link to the latest git release.

Script

You should be able to just copy and paste this (replacing the link with the one from git-scm.com)

mkdir git-download mkdir -p $HOME/bin/git
cd git-download
wget http://kernel.org/pub/software/scm/git/git-1.6.5.tar.gz # replace with your link
tar -xzf git-1.*.tar.gz
cd git*
./configure --prefix=$HOME/bin/gitlib
make
make install
echo 'PATH=$PATH:$HOME/bin/gitlib/bin/'  > ~/.bash_profile
echo 'export PATH=$PATH:$HOME/bin/gitlib/bin:$HOME/bin/gitlib/libexec/git-core'  > ~/.bashrc
PATH=$PATH:$HOME/bin/gitlib/bin
Reblog this post [with Zemanta]

Related posts:

  1. Backup Your Files
  2. Using SVK to Increase Productivity
Read more from Development, Systems
1 Comment Post a comment
  1. tkane2000
    Aug 26 2010

    waa waaaaa

    -bash-3.2$ ./configure –prefix=$HOME/bin/gitlib
    configure: Setting lib to ‘lib’ (the default)
    configure: Will try -pthread then -lpthread to enable POSIX Threads.
    configure: CHECKS for site configuration
    configure: CHECKS for programs
    checking for cc… no
    checking for gcc… no
    configure: error: in `/home/site-name/git-download/git-1.7.2.2′:
    configure: error: no acceptable C compiler found in $PATH
    See `config.log’ for more details.

    how do I install a compiler? :)

    thanks!

    Reply

Share your thoughts, post a comment.

(required)
(required)

Note: HTML is allowed. Your email address will never be published.

Subscribe to comments