Azure devops - 服务器端 git 钩子 [英] Azure devops - server-side git hooks

查看:35
本文介绍了Azure devops - 服务器端 git 钩子的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们如何实现服务器端挂钩或任何类似的解决方案来限制 git push 进入 git 服务器?

How can we implement server-side hooks, or any similar solution, to restrict git push into git server?

例如,我们想禁止推送包含 *.class 文件的提交.

For example, we want to disable push of commits containing *.class files.

推荐答案

我不认为 Azure DevOps 使用钩子.

I don't think Azure DevOps uses hooks.

您可以使用 分支策略 使用外部验证服务(据我所知,它使用网络钩子).

You can use Branch Policies to make use of an external validation service (as I understand it this uses web hooks).

附加:this User Voice 请求表明以上是官方答复.

Additional: the status of this User Voice request indicates the above is the official answer.

但也许最简单的情况是 .gitignore 和代码审查?

But maybe the simple case would be .gitignore and code reviews?

这篇关于Azure devops - 服务器端 git 钩子的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆