Skip to content

Commit a9cd4bd

Browse files
committed
docs: document core.hooksPath=/dev/null
If a user wishes to disable hooks, then they can do so using the established pattern of setting 'core.hooksPath' to /dev/null. This is already tested in t1350-config-hooks-path.sh, but has not previously been visible in the documentation. Update the documentation to include this as an option. Signed-off-by: Derrick Stolee <[email protected]>
1 parent 5b97a56 commit a9cd4bd

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

Documentation/config/core.adoc

+5
Original file line numberDiff line numberDiff line change
@@ -512,6 +512,11 @@ centrally configure your Git hooks instead of configuring them on a
512512
per-repository basis, or as a more flexible and centralized
513513
alternative to having an `init.templateDir` where you've changed
514514
default hooks.
515+
+
516+
You can also disable all hooks entirely by setting `core.hooksPath`
517+
to `/dev/null`. This is usually only advisable for expert users and
518+
on a per-command basis using configuration parameters of the form
519+
`git -c core.hooksPath=/dev/null ...`.
515520

516521
core.editor::
517522
Commands such as `commit` and `tag` that let you edit

0 commit comments

Comments
 (0)