How to set default branch policies in azure devops
Right now you can't. You could listen to events in Azure DevOps for project creation for example and then set the policy yourself. For some information how to start see here: https://docs.microsoft.com/en-us/azure/devops/repos/git/create-pr-status-server-with-azure-functions?view=vsts
Indeed as @Thomas Harris mentioned in the comment above, you can set it for all repos in a single project via
- **Project Settings*
- Cross-repo policies under "Repos" heading
- Click Add branch protection button
And then you can select whether this applies to the default branch or a specific branch name pattern.