In the context of Software Configuration Management (SCM), a pre-commit hook is a command run just before a commit is performed.
Typically, this hook is used to protect against commits that are disallowed due to content or location (e.g. to forbid empty commit log messages).
Usually, i.e. with SVN, if the pre-commit hook program returns a nonzero exit value, the commit is aborted, the commit transaction is removed, and anything printed to stderr is marshalled back to the client.