Pre-Commit Hooks

Back to Git Hooks

Scripts that run before a commit is created. Typically used to run linters, formatters, type checks, or tests on staged files. If the hook fails (exits non-zero), the commit is prevented. Ensures code quality at the source.

property git pre-commit