Azure devops - server-side git hooks

Yael picture Yael · Jan 16, 2019 · Viewed 10.3k times · Source

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

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

Answer

Richard picture Richard · Jan 16, 2019

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

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

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