I have some code quality checks in the git's pre-commit hook, which the developers can easily bypass using git commit -m "My commit message" --no-verify.
I would like to disable the --no-verify option. Is there a way to do this?
I think that you cannot forbid anything that the developers do on their machines. You should setup a CI server to verify commits as they are pushed to the repository. Commits are rather for developers and you shouldn't impose any restrictions on creating them.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With