Do you protect your main branch? aka branch protection

Updated by Brady Stroud [SSW] 6 months ago. See history

123
<introEmbed body={<> 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
Image

❌ Figure: Bad example – No protection – anyone can make unreviewed changes

Image

✅ Figure: Good example – The branch protected


Acknowledgements

Adam Cogan
Matt Wicks
Gordon Beeming
Jernej Kavka
Related rules

Need help?

SSW Consulting has over 30 years of experience developing awesome software solutions.