1
0
Fork 0
mirror of https://github.com/tldr-pages/tldr.git synced 2025-04-29 23:24:55 +02:00
tldr/pages/common/protector.md

17 lines
576 B
Markdown
Raw Normal View History

2021-04-25 07:00:01 +02:00
# protector
> Protect or unprotect branches on GitHub repositories.
> More information: <https://github.com/jcgay/protector>.
- Protect branches of a GitHub repository (create branch protection rules):
`protector {{branches_regex}} -repos {{organization/repository}}`
- Use the dry run to see what would be protected (can also be used for freeing):
`protector -dry-run {{branches_regex}} -repos {{organization/repository}}`
- Free branches of a GitHub repository (delete branch protection rules):
`protector -free {{branches_regex}} -repos {{organization/repository}}`