Search This Blog

Monday, August 29, 2011

OpenSource, Git Push Email Notification

git support email notification with diff on each push. Here is how to do it.

1.  go to your git hooks directory, $git/hooks.
2.  rename post-receive.sample to post-receive
3.  uncomment the last line, so the script will run this after someone git push.
     . /usr/share/doc/git/contrib/hooks/post-receive-email
4.  go to your git directory, $git
5.  add to your "config" file:
     mailinglist = ""
     showrev = "git show -C %s; echo"
     emailprefix = "[your email subject prefix]"
6. open "description" file, add the project name if you like
7. try git push something from somewhere else, and you will get the git notification email.

No comments: