Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to implement post commit hook in Gitolite?

Tags:

git

gitolite

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.

like image 397
Anil Kumar Avatar asked Sep 13 '26 03:09

Anil Kumar


1 Answers

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".

like image 194
VonC Avatar answered Sep 16 '26 03:09

VonC



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!