aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDerrick Stolee <stolee@gmail.com>2025-04-16 15:42:15 +0000
committerJunio C Hamano <gitster@pobox.com>2025-04-16 09:04:37 -0700
commit1b2eee94f120969690d772af5a14f681f7d875a7 (patch)
treebd670499088eb0e9bd78f267e8265a2a8e430907
parent683c54c999c301c2cd6f715c411407c413b1d84e (diff)
downloadgit-1b2eee94f120969690d772af5a14f681f7d875a7.tar.gz
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>
-rw-r--r--Documentation/config/core.adoc5
1 files changed, 5 insertions, 0 deletions
diff --git a/Documentation/config/core.adoc b/Documentation/config/core.adoc
index 8f6d8e7754..9fde1ab63a 100644
--- a/Documentation/config/core.adoc
+++ b/Documentation/config/core.adoc
@@ -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