Did we git pair?

April 29, 2013 Matthew Kocher

“Did we git pair” is something developers at pivotal are used to hearing shortly after committing and right before pushing. After reviewing the changes, one half of the pair usually takes over the keyboard to build the commit, something that lends itself to quick successive actions that follow on with little thought once you’ve mastered git.

While we pair all the time, git is just just one of the many tools (*cough* tracker *cough*) we use that that doesn’t understand pairing. Years ago we wrote a script to make setting the git author as easy as possible, and publish it as a chef recipe in pivotal_workstation and as a ruby gem.

Once the .pairs file is set up, git-pair gives us one command to run:

Matthews-MacBook-Air-3:pivotal_workstation (gemify) mk$ git pair mk bc
global: user.name Brian Cunnie & Matthew Kocher
global: user.email pair+cunnie+mkocher@pivotallabs.com
global: user.initials mk bc
Matthews-MacBook-Air-3:pivotal_workstation (gemify) mk bc$

Anyone reading especially closely will notice that we also put the current initials at the end of the bash prompt. (using another chef recipe)

If your pair wasn’t paying attention and didn’t remind you to git pair, you can ammend the the commit to fix it. However, git won’t rewrite the author by default, you’ll need to run `git commit –amend –reset-author`. The usual caveats about amending commits after pushing still apply.

About the Author


More Content by Matthew Kocher
Set your sights on the next Milestone with an Idea Board
Set your sights on the next Milestone with an Idea Board

The Idea Board Technique A typical Agile Inception ends with a fully fleshed-out backlog for the next few i...

An attitude shift as we approach production
An attitude shift as we approach production

I had the good fortune of attending a workshop about responding to production incidents, led by the folks b...

Enter curious. Exit smarter.

Register Now