X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=Documentation%2Fgithooks.txt;h=1c736738ccc91b6929226a27e02716221ec3ef05;hb=a9906723b23b058cffadaf5db9d87b67384c60c3;hp=28a8abcf52b0c4180a132d4093b6b8a59c63c6fd;hpb=f054a419419337142ffe40433aa3984ccc000624;p=git.git diff --git a/Documentation/githooks.txt b/Documentation/githooks.txt index 28a8abcf5..1c736738c 100644 --- a/Documentation/githooks.txt +++ b/Documentation/githooks.txt @@ -15,7 +15,7 @@ DESCRIPTION Hooks are little scripts you can place in `$GIT_DIR/hooks` directory to trigger action at certain points. When -'git-init' is run, a handful example hooks are copied in the +'git-init' is run, a handful of example hooks are copied into the `hooks` directory of the new repository, but by default they are all disabled. To enable a hook, rename it by removing its `.sample` suffix. @@ -151,6 +151,10 @@ indicating whether the checkout was a branch checkout (changing branches, flag=1) or a file checkout (retrieving a file from the index, flag=0). This hook cannot affect the outcome of 'git-checkout'. +It is also run after 'git-clone', unless the --no-checkout (-n) option is +used. The first parameter given to the hook is the null-ref, the second the +ref of the new HEAD and the flag is always 1. + This hook can be used to perform repository validity checks, auto-display differences from the previous HEAD if different, or set working dir metadata properties.