Sunday, February 03, 2008


Oddly enough, while Time Machine was my favorite feature of Leopard before I installed it, I've not yet started using it, in large part because it doesn't quite do what I want, and requires me to get one or more hard disks that, in total, are bigger than all the hard disks I need to back up put together.

Thanks to reddit, I came across git. Old news to some of you, no doubt, but ... wow. Where has this been all my life?

What is git?

If you've got an hour, here's Linux Torvalds talking about why he created git and a bunch of other stuff here:

The non-technical summary is this: git is a way of managing changes to the content of a directory, and sharing the changes with any number of other people. Rigorously.

The technical summary is this: git is fast, distributed, project-centric source control (vs. file-centric.)

For those who use conventional tools of this kind, such as CVS, Subversion, or Perforce -- which are all in essence the same kind of tool -- git is fast, easy to use, distributed, and content-of-the-directory-centric, vs. file-centric. In other words, the fundamental operation of CVS et al is to check out a file, modify it, and then submit the new file. Every operation needs to be thought of in terms of this fundamental operation. The fundamental operation of git is to make changes to the directory and then commit the changes.

Technically, this means that everyone works in their own branch, and merging branches is easy. Easier than simply performing ordinary changes within a single branch in a conventional SCM.

I'm no expert on SCMs, and most of my experience is with Perforce, but this is a typical operation:

  1. Decide what you want to do.

  2. Decide what files you'll need to work with.

  3. Check out those files.

  4. Make your changes. Possibly check out more files. Possibly add new files.

  5. Commit the changes, carefully specifying every file you touched.

If you're being especially responsible, you'll diff every file you're submitting to check change you've made.

Here's what you do in git:

  1. Decide what you want to do ... or not.

  2. Do it ... or whatever you end up doing.

  3. Commit the changes. (You'll be told what you changed, and can check the changes if you want.)

Installing git

You can download a pretty recent git package for OS X here. It installs very quickly (I'm a bit amazed that this command-line tool supposedly takes 100MB of hard disk space) and works flawlessly under Leopard.

There's a quick guide to using git here. I had a test project set up in git in minutes, and quickly verified all the key functionality (making branches, switching between them, rolling back) worked exactly as expected.

Next Steps

I haven't gotten into the distributed aspect of all this. (I haven't quite figured out how to do it with my current setup.) Assuming all goes well -- I'm sold. Not only on git as a version control system, but on git as a replacement for backing up in general. I could easily see git being run globally across your entire home directory in Leopard as an alternative to Time Machine, or on specific directories which need real configuration management.

Photoline Revisited

I've mentioned Photoline before as the first true Photoshop alternative I've come across, and I wrote a generally glowing review for MacApper a week or two back. I made a few critical remarks, mainly concerning cosmetic issues with Photoline's UI. Well, the developer seems to have read the review and tidied up all the dialogs and made some enhancements besides.


Microsoft and Yahoo

If you haven't seen it, you should read John Siracusa's take here (funny in large part because of the quotes). I seem to recall reading that Yahoo is hoping to be bought by Apple instead, but I'm sure Apple will have nothing to do with this.

Since Jobs returned to Apple, he has been relentlessly focussed on turning Apple into a well defined set of individually profitable businesses with clear interlocking synergies (look at this list: Mac, OS X, iPhone, iTunes, iPod, Content Creation Software, and AppleTV -- each makes money on its own and benefits from at least two of the other businesses). This is precisely the kind of company Apple is today, the kind of company Microsoft used to be, and the kind of company Yahoo has never been. Apple needs a bunch of ill-defined and not necessarily profitable or synergistic new businesses like a hole in the head. (And so does Microsoft.)

Anyway, I think this deal is the best thing ever. If we're really lucky, Microsoft will insist on moving all of Yahoo's services onto Microsoft platforms.