Archive

Archive for the ‘git’ Category

Using HostGator as a remote git repository

May 12th, 2011 3 comments

I do freelance web development, and I’ve been looking for a way to get a remote repository for my work. I tried svn over ssh, no luck. But! Git works!

The first step is to get Shell Access to your Host Gator account. See: http://support.hostgator.com/articles/getting-started/how-do-i-get-and-use-ssh-access

Now, login, and create a git repository somewhere. (I put the git repository in the webroot of the subdomain of the project I’m working on. Now, from the directory of your git repository, type “pwd” and copy down the absolute path to yoru git repository.

Now, create a clone of that repository with your git client (I use msys git with git-gui). The url would be:

ssh://username@domain:2222/(path copied from pwd command)

Viola! It will ask you for your password 2 or 3 times, but it will create a clone of the remote git repository to your directory of choice. Now, you can commit changes locally and periodically push them to your remote repository.

Categories: git, hostgator Tags: