Branch protection and merge rules
Keep important branches stable: protected patterns, required approvals and checks, and force pushes.
Branch rules live in the repository's settings, under branch protection. Set them up before the team grows, not after the first bad push to main.
Protected branch patterns
List one pattern per line, such as main or release/*. Direct pushes to a matching branch are refused before Git changes anything; changes reach it through a merge request instead.
Allow owners and admins to push directly lets the repository owner and people with the Admin role push straight to protected branches — useful for an emergency patch, off by default.
Required approvals
Require reviews before merge is on by default. While it is on, a merge request cannot be merged until at least one reviewer has approved it. The merge fails with "At least one approval is required before merging."
Turn it off only for repositories where one person works alone.
Required checks
You can name pipeline checks that must pass before a merge request can merge. Unlike the push rule above, required checks block everyone: there is no admin bypass.
A separate list names extra checks that must pass before a hosted app deploys. It adds to the merge checks, never replaces them, so raising the bar for merging always raises it for deploying.
Force push
Allow force push is off by default, and CodePinion then refuses pushes that rewrite history. Turn it on only if the team really needs to rewrite published history on this repository.