Reputation: 11254
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?
Upvotes: 6
Views: 4650
Reputation: 556
There is a flag -n
which stands for --no-verify
, is very handy to bypass hooks on git commits
git commit -n
Upvotes: 17