Commit Hook

Noun · Development

Definitions

  1. A script that runs automatically before or after certain version-control actions such as commit, push, or merge. Commit hooks are commonly used to enforce formatting, run tests, validate messages, or block changes that violate project rules.

    In plain English: An automatic script that runs around Git commit actions.

    Example: "The pre-commit hook stopped the change because the generated client files were stale and the formatter had not been run."

Related Terms