git init
is executed, some sample hooks are installed. But they are initially disabled. In order to enable these, the .sample
suffiex needs to be removed from the files. hooks
below the GIT directory (usually .git
). This default can be changed with the core.hooksPath
option. pre-commit | The first hook that is run, used to check the quality of the state to be committed. Returning non-zero aborts commit process. |
prepare-commit-msg | Run before commit editor message is shown. |
commit-msg | Has as parameter the path of the file that contains the commit message. |
post-commit | Called when commit process is done. |
applypatch-msg | |
pre-applypatch | Run when git am is executed. |
post-applypatch |
pre-rebase | |
post-rewrite | Run, for example, by git commit --amend or git rebase (but not git filter-branch ) |
post-checkout | Executed after running git checkout |
post-merge | Executed after running git merge |
pre-push | Run as part of git-push after the remote refs have been updated but before any objects have been transferred. |
pre-auto-gc | Invoked before git's garbage collection is invoked (see also git gc --auto ). |
pre-receive | |
update | |
post-receive |
fsmonitor-watchman | |
post-update | |
pre-merge-commit |