search

Home  >  Q&A  >  body text

How to make hooks in version 1.7.9.5 of git?

In the past, I usually made a post-receive below hooks/. And set permissions 777

This time I helped my friend’s VPS configure GIT but found that there was no post-receive.sample at all. So I created a post-receive myself and tried to enter content and set permissions as usual, but found that it didn't work at all. I tried gg but couldn't find a solution. I would like to ask if anyone with similar experience can give me some advice

hooks/The following file is as shown: (post-receive was created by me)

怪我咯怪我咯2793 days ago533

reply all(2)I'll reply

  • PHP中文网

    PHP中文网2017-05-02 09:25:11

    pre-receive
    is executed first when the client pushes, and can be used to reject the client's push.
    update
    is similar to pre-receive, but will be executed once for each branch.
    post-receive
    Executed after the client push is completed.

    reply
    0
  • 曾经蜡笔没有小新

    曾经蜡笔没有小新2017-05-02 09:25:11

    I also asked this question, and someone gave me the answer /q/1010000004382023
    It is indeed the case... Create a new document directly to write the content, save it, and then chmod +x post-receive to ensure that it is executable...

    reply
    0
  • Cancelreply