git - 如何在 Gitolite 中实现提交后钩子(Hook)?

标签 git gitolite

我想为一个存储库实现提交后 Hook 。我知道使用基于存储库的钩子(Hook)是可能的。任何人都可以为各自开发团队的每次提交提供电子邮件通知 Hook 的代码吗?

最佳答案

post-commit Hook 是 client-side hook .
Gitolite 是服务器端的 ACL(访问控制层),它管理对 bare repos 的访问。 (其中没有完成“git commit”,因为没有工作树)。

您可以add hooks per repo in Gitolite (如上一个问题所示),但不是“提交后”。

您可以拥有VREF (一个链接的 post-update 钩子(Hook)),它将在接收提交时执行您想要的任何操作(例如 those examples there )。
但同样,那是在服务器端。

您在“Git hook to send email notification on repo changes ”中有一些此类 post-updatepost-receive Hook 的示例。

关于git - 如何在 Gitolite 中实现提交后钩子(Hook)?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/29553602/

相关文章:

git - EGIT 说 Read timed out after 30,000 ms

git - git远程删除后,我的本地提交状态发生了变化

git - 在不克隆 gitolite repo 的情况下安装 gitolite

gitolite 存储库已创建但 projects.list 为空

git - 如何在 gitolite 中配置迁移的 git 存储库

node.js - Heroku 部署错误上的 Webpack Node.js

c# - 使用 Octokit 更新 GitHub 存储库中的文件

git - 配置 GitLab 以将每个用户的存储库存储在个人目录中

gitolite gitlist : Failed to resolve HEAD as a valid ref

Git squash 更改被远程存储库拒绝