Skip to content

Commit

Permalink
Added pre-commit hook to prevent directly committing on the primary b…
Browse files Browse the repository at this point in the history
…ranch.
  • Loading branch information
drewoldag committed Jan 31, 2023
1 parent e52e4a9 commit 1f2e6e9
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,3 +18,10 @@ repos:
language: system
pass_filenames: false
always_run: true

# prevents committing directly branches named 'main' and 'master'.
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.4.0
hooks:
- id: no-commit-to-branch
name: Don't commit to main or master branch

0 comments on commit 1f2e6e9

Please sign in to comment.