Not too big a fan of git hooks, but mostly because I haven't played around with them too much.
My script is here: https://gist.github.com/1755101 A bunch of simple functions, some wrappers for directories and the environment, and an order of operations