Given that I need to use git inside my hook scripts, I would prefer my hook scripts to not trigger hooks themselves. So I want to skip hooks on a per-command basis.
i.e. I am looking for an option like:
git --no-hooks some-git-command
You can use:
git -c core.hooksPath=/dev/null some-git-command
If you are not on an Unix (no /dev/null
) I suppose that you can use:
git -c core.hooksPath= some-git-command
Another rougher idea.
.git/hooks/pre-commit
with symbol '#'.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