Protection Levels
You can Block direct pushes with Gates to require approvals or checks before merging a Trail. Push your work to a branch that allows direct pushes, then merge it through a Trail that targets the protected branch.
Branch Names and Patterns
- Use a branch name such as
mainto protect that specific branch. - Use
HEADto protect whichever branch is currently the repository’s default. The rule follows changes to the default branch. - Use
*to match zero or more characters or?to match one character. For example,release/*matches bothrelease/1.2andrelease/1.2/hotfixbecause*can match/.
Manage Branch Rules
- Entire.com
- CLI
- Open your repository and go to Settings then Branch rules.
- Select Add rule.
- Enter a Branch name or pattern and choose a Protection level.
- Select Add rule to save.
To change a rule’s protection level, open its actions menu, select Edit rule, and select Save changes after choosing the new level. To remove a rule, select Remove rule from its actions menu and confirm. To replace a pattern, add the new rule before you remove the old one.