github: branch protection

making sure PRs to master get code reviewed, for example

In professional software development settings, it is a common practice to protect the master branch.

That is, there may be some policy rules about merging changes into master:

GitHub allows you to enforce some or all of these rules with branch protection.

Branch protection is configured in

Note that an empty repo has no commits, and therefore no branches. So you must have at least one commit (e.g. a README.md file) before you can define branch protection rules.

Related topics: