Putting Git hooks into a repository

git, githooks, hook

Solution

Nowadays you can do the following to set a directory that is under version control to be your Git hooks directory, e.g., `MY_REPO_DIR/.githooks` would be

git config --local core.hooksPath .githooks/

It is still not directly enforceable but, if you add a note in your README (or whatever), this requires a minimum of effort on each developer's part.

Problem

Is it considered to be a bad practice - to put `.git/hooks` into the projects repository (using symlinks, for example). If yes, what is the best way to deliver same hooks to different Git users?

Original source