Recently I decided that it was time to stop just reading about distributed version control and give it a go. I had already run through a variety of git tutorials, but all of them concentrated on use of local repositories and/or starting with a clone of an existing remote repository.
My main need is something slightly different, though. I want to set up my own remote repositories for my large and rambling collection of projects, so that I can access them wherever and whenever I am working.
I was tempted to use Github but decided that the learning process of doing it myself would be valuable. Eventually, I think it was, but I still might go to Github for some of my projects.
My first step was to install Git on my main development machines. On the Ubuntu box it was easy using the Synaptic package manager. On a Windows box it’s not quite so straightforward, involving a choice between a Git based on Cygwin and a Git based on direct use of Windows libraries. I eventually chose the second option, but I might change my mind later if it doesn’t work out. For the moment it does the job.
My next step was to set up the remote repository. I decided to host my repositories on some space I rent from Dreamhost, as they seem generally pretty supportive of new stuff, and already include subversion hosting.
I started by following the steps in the DreamHost Wiki entry on Git, but could not make that work. Something went wrong at the step of pushing a local repository over WebDAV. Determined to continue, I instead tried the (somewhat more complex) steps at Autopragmatic Â» Blog Archive Â» Hosting a git repository on dreamhost. Even though this involved rebuilding a slightly non-standard version of Git on the server this now works very well.
I now have a small green-field project in a remote repository at Dreamhost. My next plan is to investigate using git-svn or some other form of git/subversion bridge.