In all the repository .pre-commit-config.yaml files are added. This pre-commit hook is responsible to validate commit message and if it is not as per standard then it will generate error.
Now when someone commits into local system at the same time hook should be triggered.For the same it is required to install:
pre-commit install --hook-type commit-msg
pre-commit install
If above commands are not executed on any developer's local system then pre-commit will not executed. Of course, there can be guidelines for developer that to install pre-commit related stuff but there are chances to miss it.
So is there any way where it can be enforced to install pre-commit related stuff automatically or if developer has not installed then there can be error that please install pre-commit-hook on local machine before proceeding, without this commit should not work ?