Ang*_*elo 5 git git-post-receive
我在CentOs 6服务器上使用git 1.7.1,当我git --bare init在my_repo.git上运行时,我检查了my_repo.git/hooks,我可以看到所有挂钩,包括post-receive.sample.
现在我在Centos 7服务器上使用git 2.4.1,并且post-receive.sample文件是missng,所有其他挂钩都在那里,但不是我需要的.
我知道我可以从之前的repo复制文件,然后根据需要更改内容,但我想知道为什么post-receive.sample不像以前那样生成.
显然,post-receive.sample在提交8d714b11df2b65e5f4272c1616e561930010be90中删除了:
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>
Run Code Online (Sandbox Code Playgroud)