Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Missing git file hooks/post-receive.sample

I was using git 1.7.1 on CentOs 6 server and when I run git --bare init on my_repo.git I checked my_repo.git/hooks and I could see all hooks, including post-receive.sample.

Now I'm using git 2.4.1 on Centos 7 server, and post-receive.sample file is missng, all other hooks are there but not the one I need.

I know I can copy the file from a previous repo and then change content as needed, but I would like to know why the post-receive.sample is not generated as before.

like image 457
Angelo Avatar asked Oct 05 '15 20:10

Angelo


1 Answers

Apparently, post-receive.sample was removed in commit 8d714b11df2b65e5f4272c1616e561930010be90:

commit 8d714b11df2b65e5f4272c1616e561930010be90
Author: Gerrit Pape <[email protected]>
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 <[email protected]>
    Signed-off-by: Junio C Hamano <[email protected]>
like image 71
Arkadiusz Drabczyk Avatar answered Sep 20 '22 18:09

Arkadiusz Drabczyk