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
Use branch policies and set merge only with PR, after that direct push to the branch will be disabled, you can skip these policies for certain users (build users or admins)