Let’s be fair, subversion is an honourable version control system, better than CVS and some commercial VCS, and infinitely better than no version control at all. Still, once you’ve tried git, there’s no going back (or not willingly, anyway). The easy branching, rebase, cherry-pick, stash … did I mention I want to marry git when I grow up ?
Many posts have been written on this subject, so I’ll just link to the ones that helped me, and add some comments where necessary.
svn to git repository
you want your whole history to be available on the git server. Easy to do, as described here. I would advise to do an intermediary step to get rid of all svn references. Your branches might have names that look like paths. If this bothers you, and you’re still using them, you can create nice links pointing to them by doing
git branch -b <nicer_name> <bothersome_name>
But: this doesn’t really cover the whole story. Your project might have svn:externals.
If these externals are served from outside, you could piston them. Piston now works equally well with subversion and git.
If these externals are in-house … well. Use this how-to recursively to also have them into git repositories, and git submodule add. If this is sensitive and touching the external is a no-no, just piston them as well.
I had a look at gitorious, but it doesn’t play well with postgres, and I couldn’t be bothered to install mysql just for this purpose. So I decided on the simplest tool, which is already included in git: GitWeb. How-to is described here. Basically, if you want to try it out, go to a git repo and do:
if you’ve got lighttpd installed, otherwise add option —httpd=webrick To serve it with Apache (or Nginx), follow the tutorial above – the ‘make’ step is not actually necessary, the gitweb module apparently detects all git repos on the system.
There you go, time to git clone and start playing.
*Note: as you can see from the links, the Pro Git book is a good reference for things git. *