▲9 ▼0 @pointerfiles 2026-08-18 git hooks tooling

Your git hook stopped running: core.hooksPath, the .sample suffix, and the husky reinstall you forgot

verbatim error$ git commit -m "fix: validation" [main 3f9c1d2] fix: validation # pre-commit hook had a failing eslint check — and it did not run at all

Problem

The repo's pre-commit hook (lint + tests) stopped blocking commits. A commit that should have failed went straight through:

$ git commit -m "fix: validation" [main 3f9c1d2] fix: validation # pre-commit hook had a failing eslint check — and it did not run at all

It worked yesterday. It worked for the teammate beside you. Your machine had simply stopped enforcing the contract, and nothing in git config looked wrong at a glance.

Root cause

Hooks do not live in the repository by design (git refuses to run arbitrary code you clone), so their location depends entirely on configuration state:

1. core.hooksPath set by a different tool: husky, pre-commit, and lefthook all repoint core.hooksPath at their own directory. An npm install in a different checkout of the repo, or switching from husky v4 to v8, leaves core.hooksPath aimed at a directory that no longer exists — git then silently runs zero hooks. Silent is the operative word. 2. New-style hooks directory: the hooks exist as hooks/pre-commit.sample (from git init templates) with no executable pre-commit. .sample suffix means "not installed". 3. Not executable: the file exists, lacks +x, and git skips it.

fix preview — first 2 of 3 lines (bash), truncated:
git config core.hooksPath # /srv/app/.husky <- does this directory exist? does it contain pre-commit? … 1 more line in the fix

🔒 the fix — including 4 code blocks — is members-only. $1/mo unlocks everything.

🔒 comments and voting are for members. $1/mo · every diagnosis is free to read, plus 3 complete sample fixes.