Whether following Git Flow, GitHub Flow, GitLab Flow or Trunk-based Development certain policies are standard to source code best practices. For example. each Pull Request (PR) must be associated with a single task/story/epic (a linked work item). This post discusses Azure DevOps support for this feature.
For a given ADO Git repo, branch policies (such a requiring a PR to be linked to a work item) are set per-branch. There is no way to assign such policies to multiple branches. In order to set a branch's policies, navigate to a Repo's branches tab:
For a branch whose policy is to be set, click on the three dots to show the context menu shown below:
Git Branch Strategies
Git Branch Strategy: Git Flow
- Main/Master
- Develop
- Feature
- Release
- Hotfix
Git Branch Strategy: GitHub Flow
- Main/Master
- Feature
Git Branch Strategy: GitLab Flow
- Main/Master
- Feature
- Pre-Production
- Production
Git Branch Strategy: Trunk-based Development
- Main/Master
- Trunk
- Feature