Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Git : How to disable the --no-verify option while doing a git commit?

Tags:

git

githooks

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?

like image 338
Peeka Avatar asked Jul 31 '26 22:07

Peeka


1 Answers

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.

like image 181
Konrad Szałwiński Avatar answered Aug 03 '26 14:08

Konrad Szałwiński



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!