Blog‎ > ‎

Setting up git commit emails

posted Feb 11, 2009, 2:53 PM by Jade Rubick

We're moving Volunteer Solutions to git this week. One thing that wasn't documented well was how to set up git emails.

There is a git-notify script out there, but in contrib there is post-receive-email.

It's actually easy to set up:

cd .git/hooks
mv post-receive post-receive.bak
ln -s /path/to/post-receive-email post-receive
chmod a+x /path/to/post-receive-email
git config --add hooks.mailinglist ""
git config hooks.emailprefix "[scms]"
emacs ../description (make first line short description, then add more later)

Note that the script seemed to only send emails when they were pushed from outside.