From ed06a70eca3f944f3f99a1c51a5cfdf43abf220a Mon Sep 17 00:00:00 2001 From: mauwii Date: Sat, 18 Feb 2023 15:04:25 +0100 Subject: [PATCH] add pre-commit hook `no-commit-to-branch` additional layer to prevent accidential commits directly to main branch --- .pre-commit-config.yaml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 636600ba4d..e5d024eaee 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -36,4 +36,6 @@ repos: - id: check-symlinks - id: check-toml - id: end-of-file-fixer + - id: no-commit-to-branch + args: ['--branch', 'main'] - id: trailing-whitespace