How do I hook a git pull on the remote?

后端 未结 6 1569
陌清茗
陌清茗 2021-02-05 21:19

Is there a way to hook when a git pull happens on the remote (similar to a pre-receive or post-receive). Basically I\'d like to be able to cause the remote to commit whatever i

6条回答
  •  春和景丽
    2021-02-05 22:12

    It's not something I've ever done before, but you can run bash scripts from inside php:

    http://www.devx.com/opensource/Article/40785
    http://us2.php.net/function.exec

    Which should allow you to commit and push a set of changes via a PHP script. Chuck an interface over it or integrate it into your current editing process and you should be good to go.

提交回复
热议问题