This checkout already had a pre-push in .git/hooks. Setting core.hooksPath redirects every hook to .githooks/, so activating the template's hooks would have silently stopped it running — which is the exact failure the versioned hooks directory exists to prevent, applied to a hook. Kept its two working-tree checks: a push that leaves edits behind is how docs end up one commit adrift of the code they describe. Dropped its third. It refused whenever the branch was ahead of its remote — the precondition for pushing at all — so it fired on every real push and its only advice was to re-run with --no-verify. A guard that can never pass teaches people to bypass the two beside it that can. It did exactly that on the push of the adoption commits. Both remaining checks proven to refuse a dirty tree and pass a clean one. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> |
||
|---|---|---|
| .. | ||
| commit-msg | ||
| post-commit | ||
| pre-commit | ||
| pre-push | ||