X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=Documentation%2Fgithooks.txt;h=cfdae1efa2d446e76218df7a2586a26789a151f6;hb=f29680221124d05581dd2db52a4e7f0fa15fa929;hp=046a2a7fe7cf8ec301d3a20f7ebc587a09d210e3;hpb=e636799b4d6a6a8abad151697eae27044bb8e95b;p=git.git diff --git a/Documentation/githooks.txt b/Documentation/githooks.txt index 046a2a7fe..cfdae1efa 100644 --- a/Documentation/githooks.txt +++ b/Documentation/githooks.txt @@ -20,6 +20,10 @@ directory to trigger action at certain points. When all disabled. To enable a hook, rename it by removing its `.sample` suffix. +NOTE: It is also a requirement for a given hook to be executable. +However - in a freshly initialized repository - the `.sample` files are +executable by default. + This document describes the currently defined hooks. applypatch-msg @@ -87,12 +91,12 @@ default log message, and before the editor is started. It takes one to three parameters. The first is the name of the file that the commit log message. The second is the source of the commit -message, and can be: `message` (if a `\-m` or `\-F` option was -given); `template` (if a `\-t` option was given or the +message, and can be: `message` (if a `-m` or `-F` option was +given); `template` (if a `-t` option was given or the configuration option `commit.template` is set); `merge` (if the commit is a merge or a `.git/MERGE_MSG` file exists); `squash` (if a `.git/SQUASH_MSG` file exists); or `commit`, followed by -a commit SHA1 (if a `\-c`, `\-C` or `\--amend` option was given). +a commit SHA1 (if a `-c`, `-C` or `\--amend` option was given). If the exit status is non-zero, 'git-commit' will abort. @@ -130,6 +134,13 @@ parameter, and is invoked after a commit is made. This hook is meant primarily for notification, and cannot affect the outcome of 'git-commit'. +pre-rebase +---------- + +This hook is called by 'git-rebase' and can be used to prevent a branch +from getting rebased. + + post-checkout -----------