February 13, 2009
Last Christmas I investigated some distributed revision control systems (so that I could keep on working normally despite the spotty internet connection over the holidays). Since then I’ve been using git on a daily basis for my research work and just love it. Thanks to git-svn I can still keep the original SVN backend. This has a number of advantages (sorry for reiterating a couple of points here):
- I access my SVN repositories via HTTPS. That means they’ll work even in the most ridiculously firewalled network as long as HTTPS connections are allowed. It also means that I can browse files with just a regular web browser (and nowadays even my phone has a web browser built-in!)
- While git’s Windows support is said to be getting better (I haven’t tried), SVN still has the best interoperability. When you’re not 100% sure what platforms have to access and commit to the project, SVN still is the best common denominator.
- Even with git you’ll sooner or later want to create a certain central repository that you or others can push to and pull from. Like with SVN, that too will require the server to have git installed, by the way. So that repo might just as well be in SVN, given the two points above.
So, I’m still using SVN for the backend and for the frontend where necessary. Otherwise I use git. I’m probably only using 10% of its features (which is fine by me), but boy I’m sold:
- git’s really well documented, I particularly like the insightful tips from gitready.com but the man pages and the online user manual are just as good. Compared to that, the Mercurial book is close to being useless.
- It simply makes sense. Lots of people say git is weird and compared to SVN, it sometimes really is. But the more time I spend using git, the more I feel that this is the way it should be done. Mercurial is conceptually very similar to git and both are increasingly popular which to me seems to indicate that both must be doing something right.
One thing that falls under the “the way it should be done” category is that you can just walk up to a directory and decide you want this stuff to be version controlled. The other day I realized I wanted to extend a piece of software. I couldn’t find out whether it was still maintained and where, so I just turned the directory into a git repository and started hacking away. Maybe it is still maintained, in which case I can always ask git to spit out my modifications as patches. Or the original author could pull my changes from the public repository I’ve set up. Come to think of it, I should probably tell the original author that
You may have noticed there, I’ve simply placed a bare git repository on a web server. I love how easy and low-tech this felt: just scp’ed it over. Just to make it a bit user friendly, I added an
index.html explaining what it is. I wonder how other people deal with this. I suppose folks without SSH access to webspace prefer sites like github.com and bitbucket.org? What do you do?