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 <stolee@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Derrick Stolee committed
Apr 16, 2025 at 15:42 UTC
1b2eee94f120969690d772af5a14f681f7d875a7
1 file changed
+5
Documentation/config/core.adoc
+5
@@ -512,6 +512,11 @@ centrally configure your Git hooks instead of configuring them on a
512
per-repository basis, or as a more flexible and centralized
513
alternative to having an `init.templateDir` where you've changed
514
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 ...`.
520
521
core.editor::
522
Commands such as `commit` and `tag` that let you edit