From 00674695fe524582824f27600c481d0ec39b4183 Mon Sep 17 00:00:00 2001 From: Nayan Date: Tue, 11 Aug 2026 06:01:41 +0530 Subject: [PATCH] chore: point the pre-commit hook at branch-policy.yml The comment referred to .github/README.md, which does not exist, and described the repo as having no remote with branch protection. The enforced rule now lives in .github/workflows/branch-policy.yml. --- .husky/pre-commit | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.husky/pre-commit b/.husky/pre-commit index d6e3eeb..e69c125 100755 --- a/.husky/pre-commit +++ b/.husky/pre-commit @@ -1,7 +1,8 @@ #!/bin/sh # Block direct commits to main — branch first, then open a PR. This and the -# pre-push guard are the only main protection there is until the repo has a -# remote with branch protection turned on (see .github/README.md). +# pre-push guard are the local half of that rule, and a hook is only ever a +# courtesy: `--no-verify` skips it. The enforced half is +# .github/workflows/branch-policy.yml, which decides what may target main. branch="$(git rev-parse --abbrev-ref HEAD)" if [ "$branch" = "main" ]; then echo "✖ Direct commits to 'main' are blocked — branch first: git switch -c "