Setting up git commit emails

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 "email@address.com"
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.

02:58 PM, 12 Jun 2008 by Jade Rubick Permalink

Better commt emails. Now with color :)

If you want a better solution that sends HTML-Mails, you can use this Gem: http://github.com/bodo/git-commit-notifier

by Bodo Tasche on 03/25/10

Link changed :)

Sorry, moved the repository to http://github.com/bitboxer/git-commit-notifier

by Bodo Tasche on 04/10/10

Add comment