git hooks - ghdrako/doc_snipets GitHub Wiki

Hooks

  • Client side - triggered by operations such as committing and merging
  • Server side - run on network operations such as receiving pushed commits
.git/hooks

Committing-Workflow Hooks:

  • pre-commit hook
  • prepare-commit-msg hook is run before the commit message editor is fired up but after the default message is created. It lets you edit the default message before the commit author sees it
  • commit-msg hook
  • post-commit - used for notification or something similar

Email Workflow Hooks (invoked by the git am command):

  • applypatch-msg
  • pre-applypatch
  • post-applypatch