Installing git on a Bluehost Hosting Account

I recently upgraded the version of git that I was using on my personal hosting account to the latest version, 1.7.4.1. I was surprised with how easy it was. I am sure that these steps are not that different for other shared hosting companies and plans, but I have only tested them on Bluehost.

  1. Download it: $ wget http://www.kernel.org/pub/software/scm/git/git-1.7.4.1.tar.bz2
  2. Unpack it: $ tar xf git-1.7.4.1.tar.bz2
  3. CD into it: $ cd git-1.7.4.1
  4. Configure it: $ ./configure --prefix=~/git-install
  5. Compile it: $ make
  6. Make a directory for it: $ mkdir ~/git-install
  7. Install it: $ make install
  8. Fix .bashrc so you can use it: Add ~/git-install to the end of your $PATH variable. If there was a line in .bashrc that looked like
    PATH=/bin:/usr/bin:~/bin,
    change it to look like:
    PATH=/bin:/usr/bin:~/bin:~/git-install/bin

Voila, you now have a functioning installation of git on your hosting account! You can use it to keep your website in version control, or do something really wild and use it as a repository server.

Tags: , , , ,

2 Responses to “Installing git on a Bluehost Hosting Account”

  1. Bob says:

    Thanks for putting this up.

Leave a Reply