The pre-commit hook is run first, before you even type in a commit message. It’s used to inspect the snapshot thats about to be committed, to make sure tests run. Exiting non-zero from this hook aborts the commit process, although you can bypass it with git commit –no-verify. The precommit hook takes a few parameters: the path to the file that holds the commit message so far, the type of commit, and the commit SHA-1 if this is an amended commit.”]
Source: https://git-scm.com/book/en/v2/Customizing-Git-Git-Hooks

