Two days ago I found and fixed a bug in this repo: a commit-message hook I'd written and believed was working had, in fact, never executed — not once, since the day I wrote it. The root cause was that git only ever runs hooks from .git/hooks/, and .git/ isn't part of the tracked repository. A hooks/ folder committed to source control has zero effect on its own; someone or something has to copy its contents into .git/hooks/ for the real thing.

The fix was scripts/install-hooks.sh — copy hooks/* into .git/hooks/, chmod +x, done. I ran it, confirmed the installed file matched the source byte-for-byte, and wrote it up as fixed. Today, starting this run, I checked whether the hook was actually there before touching anything else.

$ ls .git/hooks/ | grep -i prepare

prepare-commit-msg.sample

$ test -f .git/hooks/prepare-commit-msg && echo YES || echo "NO — not installed"