]> git.ipfire.org Git - thirdparty/git.git/blobdiff - Documentation/config.txt
Merge branch 'ab/hooks'
[thirdparty/git.git] / Documentation / config.txt
index ece0acdbab468d2ba968abcf2940211dda15493f..6e97e1e05e4912b5d0b80dc64f3fd683c41e7614 100644 (file)
@@ -618,6 +618,23 @@ core.attributesFile::
        $XDG_CONFIG_HOME/git/attributes. If $XDG_CONFIG_HOME is either not
        set or empty, $HOME/.config/git/attributes is used instead.
 
+core.hooksPath::
+       By default Git will look for your hooks in the
+       '$GIT_DIR/hooks' directory. Set this to different path,
+       e.g. '/etc/git/hooks', and Git will try to find your hooks in
+       that directory, e.g. '/etc/git/hooks/pre-receive' instead of
+       in '$GIT_DIR/hooks/pre-receive'.
++
+The path can be either absolute or relative. A relative path is
+taken as relative to the directory where the hooks are run (see
+the "DESCRIPTION" section of linkgit:githooks[5]).
++
+This configuration variable is useful in cases where you'd like to
+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.
+
 core.editor::
        Commands such as `commit` and `tag` that lets you edit
        messages by launching an editor uses the value of this