Alex Rivera | Logout

Git hook to send email notification on repo changes

Asked 2009-02-16T05:46:07.947
106

How do I configure the appropriate Git hook to send a summary email whenever a set of changes is pushed to the upstream repository?

Edit
Report

2 Answers

94

Another, more modern way to do this is with git-multimail, as suggested by Chords below.


This is how you did it in 2009.

You could add something like this to your post-receive hook in $GITDIR/hooks, or use the script in the contrib directory of the source (Available here)

answered 2009-02-16T05:49:11.717
19

Here is the simplest solution I've found:

1) Log in to your gitHub account on github.com

2) In the main tab click on Settings

3) From the main navigation choose Service Hooks

4) From Available Hooks choose Email

5) Fill in your email address in field Address

6) Check the checkbox Send from Author

7) Check the checkbox Active

8) Click on Update Settings

Optional: You can click on Test Hook for testing, check your inbox you should receive email.

Also there are images made according to the process:

enter image description here

enter image description here

enter image description here

enter image description here

And now for the grand final I have the answer which is tested and approved at my side.

How to send email to ALL development team members, when gitHub's Service Hooks->Email allows only at most 2 recipients }.

The answer is combination of Service Hook->Email @ GitHub && Google groups

  1. First login to your google account
  2. Go to Google Groups and at the top click on Create Group
  3. Type in Group Name, Group email address (will copy/paste into GitHub Service Hook->Email Address), Group description
  4. After that hit Create button at the top, your new group should be created now
  5. After that in the menu to the left hit Invite members and type in the email addresses of your team mates<
answered 2013-04-25T19:58:52.467

Your Answer