Easily build a great vocabulary without studying! Now on the App Store!
Click here for more info about the app
You need a Mail Transfer Agent MTA on the server. The easiest way is to install Sendmail, which Git uses by default.
Remember that /etc/hosts file needs the ip address to map to the domain name your sending mail from
apt-get install sendmail
Sendmail has a tendency to hang when sending mail otherwise. To test sendmail
127.0.0.1 localhost localhost.localdomain 184.108.40.206 wwwexample.com
The period on a line by itself denotes end of message and will terminate the prompt and deliver the message.
sendmail firstname.lastname@example.org this is a test how are you today world? .
Now you need to configure Git to send email after it receives a "push" from a committer. You can add email addresses, or you can set up a mailing list to email all members. Either way, you accomplish this with the following command, just remember to cd into the git repository.
Next you need to activate the post-receive hook, located in the hooks directory of your repository.
git config --add hooks.mailinglist "email@example.com"
And uncomment the last line, which uses sendmail to deliver the commit message
cp post-receive.sample post-receive
All done. Now just make some changes to your source code, add and commit them and you should receive an email with all the details!
uncomment the last line but keep the period "."