Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have a centOS VPS and I have install git.

However, I want to set up a git repo on a subdomain on one of the domains hosted on my vps in order so I can push there for testing.

How do I do this?

share|improve this question

Two options are to use the simple ssh setup from the git book here or gitolite. I prefer gitolite though since you would then have fine grained control over permissions. There are other protocols that you could use as well, but ssh has been in my experience the easiest to set up.

Once you have your subdomain pointing at your VPS ip you can clone and push to it directly via the git ssh protocol. For example:

git clone git@git.website.com:my_repo

This example assumes the following:

  • Your ssh username is git
  • Your sub domain is git.website.com
  • Your repositories name is my_repo
share|improve this answer

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .