Haml on Git

Posted February 10, 2008

I’ve been playing around with distributed revision control recently. I have another post in the works all about that, so I’ll skip over the details for now.

The upshot of my adventures is that I’m pretty much convinced that there’s almost no reason to use a client-server system rather than a distributed one1. Distributed systems have all of the capabilities of client-server systems, and more besides.

So you can imagine my pleasure when Hampton IMed me a few days ago saying “What do you think about moving Haml to Git?” I replied that I thought that was a fantastic idea.

I imported the Haml Subversion history and set up the repository last night. Today I set up the web interface. Haml is now offically stored in a Git repository. Check it out via your broser through the web interface.

To get the development branch of the code, just run

git clone git://github.com/nex3/haml.git

To get the stable branch, cd into the new haml/ directory and run

git checkout origin/stable

When creating patches, the process goes like so:

emacs                   # Make your changes
git commit -a           # Commit all changes to your local repository
git format-patch origin # Create a patch: 0001-your-commit-message.patch

You can then email, pastie, or otherwise send the resulting patch file to Hampton or me. We’ll then apply it2 (with git am), which will not only preserve your commit message but your authorship as well.

Git is awesome. Enjoy it.

1 The only exception to this that I can think of is that more people have Subversion installed than any distributed tool. But if current availability was all that mattered, we’d all still be using CVS.

2 Assuming it’s a good patch for something we want, of course. For the record, we accept many more patches than we reject.

Anonymous said February 10, 2008:

also, GIT does not run well on 80% of the computers out there… (ie Windows)

Different anonymous person said February 10, 2008:

Really? I’ve been using it on Windows for as long as I’ve used it at all, and it works remarkably well. It’s one of the few Cygwin-ized programs that has no glitches at all.

Nathan said February 11, 2008:

Anonymous 1: There are a few mitigating factors there. First, at least according to Anonymous 2, it’s workable with Cygwin. Second, since Git seems to be becoming the most popular distributed system, I imagine any kinks will be worked out in the future. Finally, although 80% of computers may be running Windows, it has a much smaller showing among Ruby/Rails developers and particularly among people who commit to Haml. So I’m not that worried.

Also, it looks like we’ll be moving the repo to GitHub. The web view is at http://github.com/nex3/haml, and the repo is available via

git clone git://github.com/nex3/haml.git
Ryan Mulligan said February 20, 2008:

One other thing to consider is that lots of tools, like trac, google code, rubyforge, etc all use svn. Unfortunately they are married very closely with their revision control of choice, trac being an exception to that list above with it’s plugins.

Eric said October 04, 2008:

MSysgit is actually quite good for Git on Windows: http://code.google.com/p/msysgit/

Make your comments snazzy with Textile!