Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Deactivate Git pre-commit hook via command line

Tags:

git

I'm using Git pre-commit/pre-push hook to build my software before every commit. This is, of course, useful when I change source code files. The hook also runs if I change non-source code files (e.g. ReadMe.md). For those commits, I don't want to run the hook.

Is there a way to deactivate the hook via the command line?

like image 435
Moerwald Avatar asked Aug 28 '26 16:08

Moerwald


1 Answers

There is a flag -n which stands for --no-verify, is very handy to bypass hooks on git commits

git commit -n 
like image 160
theraulpareja Avatar answered Aug 31 '26 08:08

theraulpareja



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!