Currently we use a dev-Branch in TFVC where every developer checks in. We have a Gated Checkin which ensures that our project builds.
Now we would like to switch to git, but TFS 2017 and Azure DevOps 2019 don´t have something similar to a Gated Checkin for git repositories. We could change our workflow to use feature branches and pull requests. But pull requests only test the code when merging to master (or another branch).
This would be okay if every feature is developed by a single developer. But in most of our features there work more than one developer on a feature. How could we prevent a developer from pushing code to a branch that breaks the build and blocks the other developers on the same branch?

We could use the Branch policies to protect the protect the feature branch.
To prevent a developer from pushing code to a branch that breaks the build and blocks the other developers on the same branch, like
Featurebranch.We could add the Build validation on the
Featurebranch to set a policy requiring changes in a pull request to build successfully with the protected branch before the pull request can be completed.In this case, this Build validation will prevent a developer from pushing code to the
featurebranch that breaks the build and blocks the other developers on thefeaturebranch.When we have one more developers on this
Featurebranch, each developer should create their own branch based on theFeaturebranch, likeFeature_DevelopA, whenever a developer merges toFeaturebranch, they need to pass the Build validation to complete the merge.Besides, we could also add other Branch policies, like code reviewers.
Hope this helps.