mirror of
https://github.com/pre-commit/pre-commit-hooks.git
synced 2026-04-06 03:56:54 +00:00
no-commit-to-branch: Default to both master and main
This commit is contained in:
parent
51e14fcc97
commit
3abbd4785c
3 changed files with 9 additions and 2 deletions
|
|
@ -140,7 +140,7 @@ Assert that files in tests/ end in `_test.py`.
|
|||
#### `no-commit-to-branch`
|
||||
Protect specific branches from direct checkins.
|
||||
- Use `args: [--branch, staging, --branch, master]` to set the branch.
|
||||
`master` is the default if no branch argument is set.
|
||||
Both `master` and `main` are protected by default if no branch argument is set.
|
||||
- `-b` / `--branch` may be specified multiple times to protect multiple
|
||||
branches.
|
||||
- `-p` / `--pattern` can be used to protect branches that match a supplied regex
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue