{"id":187,"date":"2009-11-17T10:31:00","date_gmt":"2009-11-17T10:31:00","guid":{"rendered":"https:\/\/www.root42.de\/blog\/?p=187"},"modified":"2009-11-17T10:31:00","modified_gmt":"2009-11-17T10:31:00","slug":"how-to-set-up-git-email-notifications","status":"publish","type":"post","link":"https:\/\/www.root42.de\/blog\/?p=187","title":{"rendered":"How to set up git email notifications"},"content":{"rendered":"<p>This is not very well documented in the git user manual. Here is what I did:<\/p>\n<p>Go to your central repository, not your working copy. There, change to the hooks directory:<\/p>\n<p><span style=\"font-family: 'courier new';\"> cd \/path\/to\/yourproject\/hooks<br \/>cp post-receive.sample post-receive<br \/><\/span><\/p>\n<div>If your repo is not a bare repository, you have to change to .git\/hooks to do this. The post-receive-email script can be found under contrib\/hooks\/ in the git documentation (e.g. in \/usr\/share\/doc\/git\/contrib\/hooks on most Linux distributions).<\/div>\n<div>Now configure the email hook:<\/p>\n<p><span style=\"font-family: 'courier new';\"> git config hooks.mailinglist &#8220;email1@bla.com, email2@bla.com&#8221;<br \/>git config hooks.envelopesender yourname@informatik.rwth-aachen.de<br \/>git config hooks.emailprefix &#8220;New commit: &#8220;<br \/><\/span><br \/>Also you should give your project a name:<\/p>\n<p><span style=\"font-family: 'courier new';\"> $EDITOR \/path\/to\/yourproject\/description<\/span><\/p>\n<div><\/div>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>This is not very well documented in the git user manual. Here is what I did: Go to your central repository, not your working copy. There, change to the hooks directory: cd \/path\/to\/yourproject\/hookscp post-receive.sample post-receive If your repo is not a bare repository, you have to change to .git\/hooks to do this. The post-receive-email script &hellip; <a href=\"https:\/\/www.root42.de\/blog\/?p=187\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;How to set up git email notifications&#8221;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[56,49],"tags":[],"_links":{"self":[{"href":"https:\/\/www.root42.de\/blog\/index.php?rest_route=\/wp\/v2\/posts\/187"}],"collection":[{"href":"https:\/\/www.root42.de\/blog\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.root42.de\/blog\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.root42.de\/blog\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.root42.de\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=187"}],"version-history":[{"count":0,"href":"https:\/\/www.root42.de\/blog\/index.php?rest_route=\/wp\/v2\/posts\/187\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.root42.de\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=187"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.root42.de\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=187"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.root42.de\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=187"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}