Windows:
遍歷D:\www\這個文件夾,逐個執行git pull,由於跨盤了,必須加上D:
echo off & color 0A for /d %%f in (D:\www\*) do ( D: cd %%f chdir git pull ) pause
Linux & Mac:
#/bin/bash path=/data0/www folderlist=`ls $path|grep -v '^$'` for i in $folderlist do cd $path/$i git pull done
path是你代碼的路徑