diff --git a/categories/application-lifecycle-management-alm/rules-to-better-version-control-with-git.md b/categories/application-lifecycle-management-alm/rules-to-better-version-control-with-git.md index 23351714e96..f03088ab6c0 100644 --- a/categories/application-lifecycle-management-alm/rules-to-better-version-control-with-git.md +++ b/categories/application-lifecycle-management-alm/rules-to-better-version-control-with-git.md @@ -9,7 +9,7 @@ index: - do-you-know-how-to-manage-nuget-packages-with-git - do-you-know-how-to-programmatically-get-git-commits - the-levels-to-git-mastery -- protect-your-master-branch +- protect-your-main-branch - rebase-not-merge - the-golden-rule-of-rebasing - clean-up-stale-remote-branches-in-git diff --git a/rules/protect-your-main-branch/protect-branch-bad.jpg b/rules/protect-your-main-branch/protect-branch-bad.jpg new file mode 100644 index 00000000000..b6bdc782af0 Binary files /dev/null and b/rules/protect-your-main-branch/protect-branch-bad.jpg differ diff --git a/rules/protect-your-main-branch/protect-branch-good.jpg b/rules/protect-your-main-branch/protect-branch-good.jpg new file mode 100644 index 00000000000..2382aec1370 Binary files /dev/null and b/rules/protect-your-main-branch/protect-branch-good.jpg differ diff --git a/rules/protect-your-master-branch/rule.md b/rules/protect-your-main-branch/rule.md similarity index 65% rename from rules/protect-your-master-branch/rule.md rename to rules/protect-your-main-branch/rule.md index 916b538d31d..d954f96920c 100644 --- a/rules/protect-your-master-branch/rule.md +++ b/rules/protect-your-main-branch/rule.md @@ -1,44 +1,43 @@ ---- -type: rule -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: 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 -created: 2017-09-12T22:35:37.000Z -archivedreason: null -guid: 93bfec41-6b37-4413-a660-931fffa88d44 ---- - -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) -::: - - -::: good -![Figure: Good example – the branch protected](protect-branch-good.jpg) -::: +--- +type: rule +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: 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 + - protect-your-master-branch +created: 2017-09-12T22:35:37.000Z +archivedreason: null +guid: 93bfec41-6b37-4413-a660-931fffa88d44 +--- + +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) +::: + +::: good +![Figure: Good example – The branch protected](protect-branch-good.jpg) +::: diff --git a/rules/protect-your-master-branch/protect-branch-bad.jpg b/rules/protect-your-master-branch/protect-branch-bad.jpg deleted file mode 100644 index ad91dd44875..00000000000 Binary files a/rules/protect-your-master-branch/protect-branch-bad.jpg and /dev/null differ diff --git a/rules/protect-your-master-branch/protect-branch-good.jpg b/rules/protect-your-master-branch/protect-branch-good.jpg deleted file mode 100644 index e97af382174..00000000000 Binary files a/rules/protect-your-master-branch/protect-branch-good.jpg and /dev/null differ