简体   繁体   中英

How to automate git pull from remote repo

Suppose a user is working on some angular project on system A having a remote repo on Github. I also have this project on a server which is also linked with that same repo.

If the user made some changes and then push to the remote repo using system A.

How the server system can automate the task of git pull. I mean how the server should know that there are changes pushed to remote that needs to be pulled automatically.

I read about hooks but I don't know how to achieve this scenario.

An easy way to achieve the same is by using a cronjob.

This may be helpful for you in the future not just for automating a git pull but any of the tasks or triggers you wanna create.

Link: cron-job

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM