[linux] git如何定时拉取代码

66 阅读1分钟

1.写一个sh脚本

#!/bin/bash
cd /www/wwwroot/project/build0417
git pull

添加权限 chmod a+x gitpull.sh

2.使用宝塔的定时任务执行

image.png