@echo off
chcp 65001
echo %date% %time% "开始git pull">>D:\dev\gitpull.log
call:gitpull D:\dev\project
echo "git pull 完成">>D:\dev\gitpull.log
timeout /nobreak /t 10
goto:End
:gitpull
set file=.gitignore
if exist %~1%file% (
git -C %~1 pull >>D:\dev\gitpull.log
) else (
for /d %%i in (%~1\*) do (
if exist %%i\%file% (
git -C %%i pull >>D:\dev\gitpull.log
)
)
)
goto:eof
bat 代码自动拉去git
最新推荐文章于 2023-03-23 08:59:40 发布