My understanding is that branch policies allow us to prevent push to master but allow PR. But I could not find a policy or security settings on Azure DevOps that allow me to do this. What am I missing?
My understanding is that branch policies allow us to prevent push to master but allow PR. But I could not find a policy or security settings on Azure DevOps that allow me to do this. What am I missing?
After you set up a required branch policy, you can't directly push changes to the branch. Changes to the branch are only made through pull requests. You can refer to this Q&A in the document.
Please note that:
For example: If the policy requirement here is optional, you can still push changes directly to the branch. If the policy requirement here is required, you need to create a pull request to push changes.