diff --git a/rules/protect-your-master-branch/protect-branch-bad.jpg b/rules/protect-your-master-branch/protect-branch-bad.jpg index a2981ee5679..ad91dd44875 100644 Binary files a/rules/protect-your-master-branch/protect-branch-bad.jpg and b/rules/protect-your-master-branch/protect-branch-bad.jpg differ diff --git a/rules/protect-your-master-branch/protect-branch-good.jpg b/rules/protect-your-master-branch/protect-branch-good.jpg index 0f14cff900b..e97af382174 100644 Binary files a/rules/protect-your-master-branch/protect-branch-good.jpg and b/rules/protect-your-master-branch/protect-branch-good.jpg differ diff --git a/rules/protect-your-master-branch/rule.md b/rules/protect-your-master-branch/rule.md index aaff7610a0b..916b538d31d 100644 --- a/rules/protect-your-master-branch/rule.md +++ b/rules/protect-your-master-branch/rule.md @@ -1,25 +1,38 @@ --- type: rule -archivedreason: -title: Do you protect your Master Branch? -guid: 93bfec41-6b37-4413-a660-931fffa88d44 -uri: protect-your-master-branch -created: 2017-09-12T22:35:37.0000000Z +title: Do you protect your main branch? aka branch protection +uri: protect-your-main-branch authors: -- title: Adam Cogan - url: https://ssw.com.au/people/adam-cogan -- title: Jernej Kavka - url: https://ssw.com.au/people/jernej-kavka + - title: Adam Cogan + url: https://ssw.com.au/people/adam-cogan + - title: Matt Wicks + url: https://ssw.com.au/people/matt-wicks + - title: Gordon Beeming + url: https://www.ssw.com.au/people/gordon-beeming/ + - title: Jernej Kavka + url: https://ssw.com.au/people/jernej-kavka related: [] redirects: -- do-you-protect-your-master-branch - + - do-you-protect-your-master-branch +created: 2017-09-12T22:35:37.000Z +archivedreason: null +guid: 93bfec41-6b37-4413-a660-931fffa88d44 --- -Use the VSTS Branch Policies feature. This is a super sexy feature. +Branch protection is a feature in version control software that allows teams to define rules and restrictions around who can make changes to specific branches, what types of changes are allowed, and if there are conditions that have to be met. +This can include: + +- number of reviewers +- linked work items e.g. PBIs (super useful to track back to why the code was changed) +- any feedback has been addressed/resolved +- enforcing specific merge types +- checking that builds pass +- checking other services e.g. code quality like SonarQube +- automatically adding specific people to review the code + ::: bad ![Figure: Bad example – no protection – anyone can make unreviewed changes](protect-branch-bad.jpg)