Git · Option
commit-msg hook
Git hooks are scripts that Git runs during commands such as commit, merge, rebase, checkout, and patch application. Some hooks can reject an operation; others run afterward for notification.
Last updated
Syntax
Executable scripts in .git/hooks/; each hook uses its documented command-specific arguments.In-depth API docs are only for subscribers: parameters, examples, common mistakes and interview practice.
SubscribeRelated
applypatch-msgpre-applypatchpost-applypatchpre-commitpre-merge-commitprepare-commit-msgcommit-msgpost-commit