git 代码自动部署

在安装了git的情况下执行以下操作:

首先在/home/wwwroot 下把你的代码从远程仓库克隆到这里
git clone -b 分支名 远程地址(-b 是指定分支,不指定则克隆master分支)

例如:git clone git://github.com/jquery/jquery.git

定时执行:
每过1分钟执行后面的命令 :

 */1 * * * * cd /home/wwwroot/你的项目;/usr/local/bin/git pull

设置秒级定时任务
https://blog.csdn.net/weixin_42433970/article/details/109641937

猜你喜欢

转载自blog.csdn.net/weixin_42433970/article/details/109519365