Setting the Commit Author to Pair Programmers' Names in Git

Posted by sam 01/05/2009 at 10:34AM

In beezwax’s webdev division we generally work in pairs, but our commit logs didn’t used to show this. We wouldn’t bother to reconfigure the git author every time we sat down with a new pair so our git log only recorded one of the programmers’ names. Bryan Helmcamp has a nice script for setting your git commit author in pair programming situations. Here’s another one which works interactively.

A Use For Git's Post-Commit Hook

Posted by sam 12/01/2008 at 06:47AM

I love git and I love to be lazy, so lately I’ve been playing with git hooks.

Git’s default pre-commit hook is really handy, but today I’m in more of a post-commit kind of mood.  Like all git’s hooks it comes with an example script.

This one isn’t particularly useful.  It evaluates Nothing and returns a successful exit code.  Big deal.

Git’s default post-commit hook.

#!/bin/sh
#
# An example hook script that is called after a successful
# commit is made.
#
# To enable this hook, make this file executable.

: Nothing

Older Articles