]> git.ipfire.org Git - thirdparty/git.git/commitdiff
docs: document core.hooksPath=/dev/null
authorDerrick Stolee <stolee@gmail.com>
Wed, 16 Apr 2025 15:42:15 +0000 (15:42 +0000)
committerJunio C Hamano <gitster@pobox.com>
Wed, 16 Apr 2025 16:04:37 +0000 (09:04 -0700)
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>
Documentation/config/core.adoc

index 8f6d8e77541261d67abac4f990f36ebb29b568c6..9fde1ab63a70ea3b595434e54f7e52e0ae181995 100644 (file)
@@ -512,6 +512,11 @@ centrally configure your Git hooks instead of configuring them on a
 per-repository basis, or as a more flexible and centralized
 alternative to having an `init.templateDir` where you've changed
 default hooks.
++
+You can also disable all hooks entirely by setting `core.hooksPath`
+to `/dev/null`. This is usually only advisable for expert users and
+on a per-command basis using configuration parameters of the form
+`git -c core.hooksPath=/dev/null ...`.
 
 core.editor::
        Commands such as `commit` and `tag` that let you edit