I want to implement post commit hook for one repo. I know it is possible with repo based hooks. Can any one provide code for Email Notification hook for every commit to respective Dev Team.
A post-commit
hook is a client-side hook.
Gitolite is an ACL (Access Control Layer) on the server side, which manages access to bare repos (where there is no "git commit
" done, since there is no working tree).
You can add hooks per repo in Gitolite (as seen in your previous question), but not a "post-commit
" one.
You can have a VREF (a chained post-update
hook) which would make any operation you want when receiving commits (like those examples there).
But again, that is on the server side.
You have some example of such post-update
or post-receive
hooks in "Git hook to send email notification on repo changes".