Git auto-pull using cronjob

后端 未结 5 1548
死守一世寂寞
死守一世寂寞 2020-12-12 12:55

I was trying to create a cronjob with a task to do a git pull every minute to keep my production site in sync with my master branch.

The git pull needs

5条回答
  •  余生分开走
    2020-12-12 13:08

    While you do need to figure out how to get the update to work in the first place, you'd be far better off using a hook from the upstream to make it go. You can do this simply with curl from a post-commit hook or if you're using github, just use a post-receive hook on their side.

提交回复
热议问题