Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I create a git repo on my shared hostgator?

Tags:

git

repository

How do I create a git repo on my shared hostgator? Got SSH access by the way.

like image 804
Ali Gajani Avatar asked Mar 06 '12 22:03

Ali Gajani


People also ask

Can multiple people own a repository?

The free/Individual version allows for up to three "collaborators". That should be exactly what you're looking for. The team versions, on the other hand, allow for multiple collaborators AND "user management". If you wanted finer control over what collaborators can and cannot do, you'd need a team version.

Does Hostgator support Git?

Once you've logged in, set up a directory on Hostgator where your Git server is going to live. eg. This initialises your Git server in the mywebsite. git directory.


1 Answers

Assuming Git is installed...

git init --bare /path/to/repo

If Git isn't installed, you won't be able to push directly to the hosted repository, but you can make a snapshot available by doing the following (from here):

First, on your local machine, run these commands (this assumes your repo is at ~/foo locally):

git clone --bare ~/foo ~/foo.git
cd ~/foo.git
git --bare update-server-info

Then, copy the resulting foo.git directory into your webserver's public_html directory. After doing so, you should be able to pull from the http://yourserver.com/you/foo.git or the like. Any time you want to update the snapshot, you'd need to repeat the above steps.

like image 114
Amber Avatar answered Sep 28 '22 19:09

Amber