http://www.flickr.com/photos/mplemmon/231740358/

Getting Windows Git Bash to Hitch

On a Windows 7 machine that already had Windows Git bash version 1.7.9-preview20120201 on it, I wanted to add ‘hitch’. Hitch is a great little Ruby program that manipulates the Git author settings to properly attribute pair programming work. Rather than a commit having a single author, Hitch creates a unique email address from a known base email address and adding the pair names after a + symbol.

This is useful as when we push code up to GitHub it becomes clear which pair have been working on a task. You can also create a Gravatar for the unique concatenated email address so the pair combination can have their own logo too.

The installation is simple: gem install ruby. The Windows machine didn’t have Ruby on it so I went to Ruby Installers for Windows and downloaded v1.9.3-p125. make sure you tick the box in the install wizard to add the Ruby executables to your PATH. When Git Bash starts it’s loaded with the Windows PATH settings anyway so it should be able to find Ruby to install hitch.

Hitch itself is a breeze to setup using your GitHub usernames.
hitch username1 username2

Hitch will ask if you want to add the usernames to its local hitch_pairs files to save you entering their full name again. Enter their full name and you’re good to go. Now each subsequent git commit will have the correct author information. Pair programming is great and Hitch allows both members of the pair to have their work attributed.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.