Friday, December 14, 2007

To Git, or not to Git.

I just read Joe Moore's (Pivotal Labs) thoughts on the Linus Torvalds' Git talk that was presented at Google.

I had also watched Linus' Google Talk video about a month ago, and had been hearing about Git in the Merb IRC room.

Git: A cruel piece of software?
The chairman introducing Linus describes Git as "a revision control system which is expressly designed to make you feel less intelligent than you thought you were" and as "a software tool which only he [Linus] is smart enough to know how to use." Was he joking or partly serious? I wasn't entirely sure.

With that preface, I had the impression that using Git was going to have a cliff like learning curve. Nevertheless, I decided to give it a try so I could at least know what others were talking about.

A collaboration of 1
Unlike Pivotal Labs, I'm just a solitary developer using SCM to track changes on my own code. So my needs are fairly limited. I don't really have any "collaboration" needs.

For someone with my limited SCM needs, probably any SCM would work just fine.

Initial thoughts
After using Git a bit, here are a my basic thoughts.

  • It's actually not too difficult at all (at least at a basic user level).
  • It is a command line tool. That's fine for me, as I always have a terminal open anyways.
  • Basic commands are easy to remember: "git status", "git add", "git commit", "git push"
  • It's pretty easy to setup custom ignore files and setup a remote repo.
  • Committing locally is fast & independent of your internet connection.
  • Deployment via Capistrano (v2.1) supports Git.
It appears that branching and merging are very easy, but honestly I don't really do too much (ok, any) of either. I will experiment with that in the future to see if it adds any value to my specific work flow.

You won't find the same level of application support for Git as SVN at the moment. For example, the other day I read about the release of SVNmate, a bundle for Textmate which adds some SVN status icons to your files. There currently is not a bundle offering the same for Git (although there is a bundle "work in progress"). Not necessarily deal-breakers, but things to be aware of.

Personally, I'm going to continue using Git and become more familiar with it's capabilities.

NOTE: Git does have the gitk command which opens a GUI. I haven't used it, other than a cursory glance, and thus am not familiar with it's features.

Related Resources:
Git Cheat Sheet:
Git Tutorial:


  1. Actually gitk is history viewer, while git-gui is graphical commit tool (and not only: check for example "git gui blame file", graphical blame).

    As to chairman introduction: Git was very difficult to use at beginning, when it consisted only of bare bones porcelain, but it much improved since.

  2. jnareb: thanks for the tip on git gui and the background on Git!

  3. I find git to be easier for me to use on projects where I am the only one doing the editing.

    I love that I can add and remove files without having to worry about svn being mad about a file disappearing. It seems much easier for me to work how I like to work.

    Also, I branch a lot more now. I never branched with svn, but now I find myself branching all the time, because it's so easy and fast.

    Good luck.

  4. Justin, your header about a "cruel piece of software," and the chairman's comment about making you "feel less intelligent than you thought you were," had me chuckling when I thought of one of the definitions of "git" used by the British to insult someone.