@echo off & title 根据列表list.txt自动svn转化git setlocal enabledelayedexpansion set "GIT_HOST=http://192.168.50.184:3000" goto :main :FUNC_SVN2GIT set "git_name=%1" echo %GIT_HOST%/kinve/%git_name%.git cd %git_name%.git ::创建一个新的仓库 ::touch README.md if not exist .git ( call git init call git add . call git commit -m "首次推送" call git remote add origin "%GIT_HOST%/kinve/%git_name%.git" call git remote set-url origin "%GIT_HOST%/kinve/%git_name%.git" ) if not exist README.md ( echo .>README.md call git add README.md ) call git push origin master cd .. exit /b ::其他 ::git push origin remotes/origin/feature:refs/heads/feature ::git push origin remotes/origin/bugfix:refs/heads/bugfix ::git push origin remotes/origin/develop:refs/heads/develop ::git push --tags :main for /f "delims=|" %%i in (list_git.txt) do ( echo "执行工程:%%i" call:FUNC_SVN2GIT %%i )