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.
- Download it:
$ wget http://www.kernel.org/pub/software/scm/git/git-1.7.4.1.tar.bz2
- Unpack it:
$ tar xf git-1.7.4.1.tar.bz2
- CD into it:
$ cd git-1.7.4.1
- Configure it:
$ ./configure --prefix=~/git-install
- Compile it:
$ make
- Make a directory for it:
$ mkdir ~/git-install
- Install it:
$ make install
- 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: bluehost, git, programming, scm, server
Thanks for putting this up.
No problem!