How can I create server side Git pre-commit hooks that propagate to clients on git clone or git init?


#1

I would like to create git pre-commit hooks in our projects, to ensure that log messages contain Jira numbers.
Of course, I want our developers to acquire these hooks when the git clone or init.

If I add the hook script to the server side .git directory, will that be propagated to clients on git clone and git init?
I am looking at https://git-scm.com/docs/githooks but this point is not clear to me.

Also, it would be great if there were a way to do this in Gitlab, so I don’t need a server admin to do it. Is this possible or are there any plans to add this feature to Gitlab in the near future?