hooks 1) is an extension system of Git to execute executable file implemented by external party (ie not Git) that run at specified steps of a command.
There are two groups:
Hooks triggered during a push
The working directory is the git dir.
The whole list is available online here
All hooks are stored in the hooks subdirectory of the git directory location that contains already examples.
List of examples:
ls -1 .git/hooks
applypatch-msg.sample*
commit-msg.sample*
fsmonitor-watchman.sample*
post-update.sample*
pre-applypatch.sample*
pre-commit.sample*
pre-merge-commit.sample*
pre-push.sample*
pre-rebase.sample*
pre-receive.sample*
prepare-commit-msg.sample*
push-to-checkout.sample*
sendemail-validate.sample*
update.sample*
The location can be changed via the core.hooksPath configuration
git config core.hooksPath
The working directory is
Hooks can get their arguments via:
git init may copy hooks to the new repository, depending on its configuration. See the TEMPLATE DIRECTORY section