How do I hook a git pull on the remote?

后端 未结 6 1566
陌清茗
陌清茗 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:20

    I think you can't do this with hooks, for what I understand reading the hooks' doc there's no hook that fits into your requirement.

    If I need something like what you want I'd create a script on 'remote' that runs every hour and checks if any file was changes (git status) and commit all (git commit -a -m "Auto commit").

提交回复
热议问题