Skip prepare-commit-message git hook?

Viewed 31

I have a prepare-commit-message set up that runs on every commit. I want to skip this hook on this one specific commit.

Using the --no-verify option is no help, since the prepare-commit-message hook is not affected by that option.

Is there any way for me to just skip the hook this one time without changing my configuration?

1 Answers

You could (ab)use core.hooksPath:

git -c core.hookspath=/dev/null commit
Related