@echo off rem 在 DNS 被污染的环境下推送代码:把 git.xnhw.cc 固定到可用的 Cloudflare 边缘 IP。 rem 用法: scripts\push.cmd [分支名] setlocal set BRANCH=%1 if "%BRANCH%"=="" set BRANCH=main set TOKEN=31e7789457b5e95f7a278a4584fd33c30e34fecc set IP=104.21.9.133 cd /d "%~dp0.." git -c http.curloptResolve="git.xnhw.cc:443:%IP%" -c credential.helper= ^ push "https://l:%TOKEN%@git.xnhw.cc/l/lnxgit.git" %BRANCH%:%BRANCH% endlocal