“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 firstname.lastname@example.org
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