如何定期自动拉取请求

时间:2015-01-30 14:58:06

标签: git

是否可以在Windows机器上通过sourceTree或其他应用程序在常规(通过批处理文件)间隔回购自动拉取请求..?

2 个答案:

答案 0 :(得分:0)

使用Windows任务计划程序自动开始重复任务(包括批处理文件)

答案 1 :(得分:0)

批处理脚本:

C:\xxx\xxxx\xxxx\xxxx\xxxxx\Git\bin\sh.exe --login -i -c "/d/backupScript.sh"

备份脚本:

PWD=$(pwd);
function welcome() {
   echo "current Dir   : $PWD";
}
function backup_1() {
    cd /d/xxx/xxx/xxx
    echo "backup_1   : $PWD";
    git pull origin master  
}
function backup_2() {
    cd /d/xxx/xxx/xxx
    echo "backup_2   : $PWD";
    git pull origin master      
}
function backup_3() {
    cd /d/xxx/xxx/xxx
    echo "backup_3   : $PWD";
    git pull origin master      
}
function backup_4() {
    cd /d/xxxx/xxxx/xxxxx
    echo "backup_4   : $PWD";
    git pull origin master      
}
backup_1;
backup_2;
backup_3;
backup_4;
echo "See You Soon";
sleep 5;