Skip to content

Commit 1f2e6e9

Browse files
committed
Added pre-commit hook to prevent directly committing on the primary branch.
1 parent e52e4a9 commit 1f2e6e9

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

.pre-commit-config.yaml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,3 +18,10 @@ repos:
1818
language: system
1919
pass_filenames: false
2020
always_run: true
21+
22+
# prevents committing directly branches named 'main' and 'master'.
23+
- repo: https://github.com/pre-commit/pre-commit-hooks
24+
rev: v4.4.0
25+
hooks:
26+
- id: no-commit-to-branch
27+
name: Don't commit to main or master branch

0 commit comments

Comments
 (0)