简体   繁体   中英

How would I automatically execute a git pull after a commit?

I have a server running Jenkins with a repository setup holding a directory within the server so that when I travel, I can just pull changes on my laptop and push any others. However, when I want to push changes, it does push to GitHub and Jenkins, but doesn't update the server files itself. How would I set this up to where the server will automatically pull changes from Jenkins/Github to the server files?

Directory is holding many folders with zip files. Changes would include new folders/new zip files within folders. As of now, I have to use PuTTy via FTP to manually pull any changes from Jenkins/Github.

Using Ubuntu 14.04 LTS for the server, Jenkins ver. 1.590.

如果您使用的是bitbucket,则此链接建议一个好的解决方案,我用过它,它非常好。

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