Git LogoI’ve been using Git quite a lot lately for managing my code.  For those of you that don’t know, Git is a version control system, similar to SVN.

Historically, my only real experience with version control was Microsoft VSS (Visual SourceSafe).  But that was back in my Windows days in a corporate environment working for the man.  As an independent developer I’ve realized that I require something similar, even if it is only me that’s working on the project.

Fast forward a few years.  I now use a Mac (I was about to write “I’m a Mac user”, but I’m not really… I’m pretty platform agnostic; I just happen to use a Mac).  I don’t have a team of dev support personnel and a bunch of servers /development environments to aid my struggle to build a better mousetrap.  It’s just me.  So, after a little R&D (Research and Discussion) I decided to settle on Git.

Fast forward a few months to today.  I’m now a (relatively) happy Git user.  I must say I love ProjectLocker (no affiliation).  But I use their free service and it gives me piece of mind as I know my code is backed up somewhere.  Also, their integration with Trac makes managing changes a breeze, especially since I can give my client access to Trac and let them add/monitor tickets.

Up until today I was using GitX as my UI tool.  I actually like it quite a lot.  It works very well for me, and performing basic repository management is a breeze.  Well a few hours ago I was talking to a friend who’s thinking about moving from SVN to Git, and he pointed me at GitNub.  It looked really slick, so I decided to install it and check it out.

Well, as is the case with OSS, nothing is easy.  So I decided to publish the steps required to get this bad boy working properly on OS X (10.6.4 in case it matters).  Note that this assumes you already have Git working properly.  This article and this article helped me a lot with that, as has/does Stack Overflow.

  1. Download the latest version of RubyCocoa here (or more specifically here for the exact version I’m using).
  2. Install RubyCocoa by opening the .dmg file and running the .pkg.  Easy.
  3. Install grit.  The easiest way to do this is to open Terminal and type:
    gem install grit
  4. Download GitNub here (or more specifically here if you want to use the 0.9.1 version that I am).
  5. Extract the zip. Drag GitNub.app into your Applications folder.
  6. Move/copy nub into:
    /usr/local/bin
  7. In Finder, navigate to /Applications.  Right-click GitNub.app and select Show Package Contents.  In the window that opens, navigate to Contents/Resources.
  8. Open TexturedWindow.rb in your favorite editor.  Change line 14:
    self.setContentBorderThickness_forEdge(44.0, NSMinYEdge)

    to:

    self.setContentBorderThickness_forEdge(44.0, CGRectMinYEdge)
    self.registerForDraggedTypes([NSURLPboardType, NSFilenamesPboardType])
  9. Save the file.

That’s it.  To use it just navigate to your Git repository via Terminal and type

nub

The install process is definitely a PITA (especially with the required bugfix), but the app seems a little more polished (visually at least) than GitX.  Hopefully they implement a way to open a repository without using the command-line though, as this is also a bit of a PITA.