After the remote git warehouse changes, the computer can detect the change and automatically pull the code. How to achieve this?
淡淡烟草味2017-06-05 11:11:03
Starting a scheduled task in the background is indeed a solution, but it is obviously a waste of server resources.
The purpose should be to automate deployment. If you want to directly connect your own development environment and deployment environment, git hook can handle it.
If you use GitHub to host a layer in the middle, you can use GitHub's webhook, https://developer.github.com/..., of course, you also need to write a background service yourself to accept requests triggered by the webhook.
You can also use the ready-made tool travis ci, https://travis-ci.org/.
The above is for reference only.
滿天的星座2017-06-05 11:11:03
No. The client cannot know the changes on the remote end. You can go to git pull regularly...