Files
cheatsheet-tldr/tldr/protector
2025-12-02 00:21:15 +00:00

22 lines
675 B
Plaintext

---
syntax: markdown
tags: [tldr, common]
source: https://github.com/tldr-pages/tldr.git
---
# protector
> Protect or unprotect branches on GitHub repositories.
> More information: <https://github.com/jcgay/protector#usage>.
- 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}}`