Hook timing
A pre-commit hook runs before Git creates a commit, while commit-msg receives the path to the proposed commit-message file. A pre-push hook runs after Git has determined which refs would be sent but before it transfers them. The generator places the selected lint, test, and format commands at the chosen checkpoint, so their exit status can control whether Git continues.