Skip to content

git 多库拉取

拉取当前文件目录下所有 git 文件夹

bat
@echo off
@REM 获取目录列表
@for /f "delims=" %%d in ('dir /b /a:d') do (
    echo [info::Updating %%d...]
    @REM 假如是 git 仓库的才更新
    if exist %%d\.git (
        cd %%d
        git pull
        cd ..
    ) else (
        echo [warning:: %%d is not a git repository. skipped.]
    )
)
echo [info::All Done!]
pause