缺少git文件挂钩/post-receive.sample

缺少git文件挂钩/post-receive.sample,git,git-post-receive,Git,Git Post Receive,我在CentOs 6服务器上使用的是git 1.7.1,当我在我的_repo.git上运行git--bare init时,我检查了我的_repo.git/hooks,我可以看到所有的钩子,包括post receive.sample 现在我在Centos 7服务器上使用git 2.4.1,post-receive.sample文件是missng,所有其他钩子都在那里,但不是我需要的那个 我知道我可以从以前的回购中复制文件,然后根据需要更改内容,但我想知道为什么没有像以前那样生成后接收.sample

我在CentOs 6服务器上使用的是git 1.7.1,当我在我的_repo.git上运行
git--bare init
时,我检查了我的_repo.git/hooks,我可以看到所有的钩子,包括post receive.sample

现在我在Centos 7服务器上使用git 2.4.1,post-receive.sample文件是missng,所有其他钩子都在那里,但不是我需要的那个


我知道我可以从以前的回购中复制文件,然后根据需要更改内容,但我想知道为什么没有像以前那样生成后接收.sample

显然,
后接收.sample
在提交中被删除:

提交8d714b11df2b65e5f4272c1616e561930010be90
作者:Gerrit Pape
日期:2011年9月27日星期二11:56:53+0000
模板/挂钩--*:删除没有任何功能的示例挂钩
移除示例post commit和post receive挂钩。样本
post commit不包含任何示例功能,注释也不包含任何示例功能
不提供比文档中已有信息更多的信息。
示例post接收挂钩不提供任何示例功能
并且在注释中引用了一个contrib钩子,该钩子可能是
安装在不同系统上的不同位置,不是这样的
有帮助。
签字人:Gerrit Pape
签字人:Junio C Hamano
commit 8d714b11df2b65e5f4272c1616e561930010be90
Author: Gerrit Pape <pape@smarden.org>
Date:   Tue Sep 27 11:56:53 2011 +0000

    templates/hooks--*: remove sample hooks without any functionality

    Remove the sample post-commit and post-receive hooks.  The sample
    post-commit doesn't contain any sample functionality and the comments do
    not provide more information than already found in the documentation.
    The sample post-receive hooks doesn't provide any sample functionality
    either and refers in the comments to a contrib hook that might be
    installed in different locations on different systems, which isn't that
    helpful.

    Signed-off-by: Gerrit Pape <pape@smarden.org>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>