core.hooksPath
The setting that tells Git to look for hooks in a folder you choose instead of .git/hooks.
In more detail
Pointing it at a folder inside the repository, such as .githooks, lets the team commit and share hooks. Each person still has to set it once in their clone, because config is not committed either.
Example
git config core.hooksPath .githooksRelated terms
- Git hook — A script Git runs automatically at a point in its workflow, such as pre-commit, which can stop the commit by exiting non-zero.
- git config — The command that reads and writes Git settings, which live in plain text config files.
Taught in
- Conventional Commits — Advanced Git Internals & Distributed Workflows