Since my last post I’ve been using git more and more. It really suits the way I work a lot better than subversion. Because of this, I wanted to convert one of my projects from svn to Git. It’s a private project, and while I could pony up the cash and get a paid account on GitHub, I’d rather keep everything on something under my control.
I’ve already moved the main project over to slicehost, and since I’m already paying for the space I thought it would be a great idea to host my repositories there.
It was a hell of a lot easier than I thought it would be.
One of the requirements of the install is that I connect to the git repository over ssh. I’ve got it set up so that my ssh server is listening on port 30000 and it authenticates using a public key. No faffing about with passwords here!
Here’s what I did.
Install Git
The first thing we need to do is install git. I’m using aptitude, so this would be done like this:
1
| |
Now you’re ready to create the actual repository.
Create Your Remote Repository
While still connected to your slice, enter the following. Change anything you need to, of course.
1
| |
It doesn’t really get much easier than that.
1
| |
Now we go to work on making the local repsitory. All of this is on your local machine:
1 2 3 4 5 6 7 | |
In my case, the ssh section would be:
1
| |
Push!
Now all you have to do is push your local changes back to the remote server. On your local machine: @ git push origin master @ That’s it. You’re done.