30 lines
782 B
Batchfile
30 lines
782 B
Batchfile
@echo off
|
|
REM ==========================================
|
|
REM Git Push Config - jcl-cobol
|
|
REM 仓库: https://gittea.dev/hsyx3952501/jcl-cobol-git
|
|
REM ==========================================
|
|
setlocal
|
|
|
|
set REMOTE_URL=https://gittea.dev/hsyx3952501/jcl-cobol-git.git
|
|
set TOKEN=1afb8ef3b16901f0e44238fff78fca5c0f1ff570
|
|
|
|
REM 设置远程仓库(HTTPS + Token 认证)
|
|
git remote remove origin 2>nul
|
|
git remote add origin https://hsyx3952501:%TOKEN%@gittea.dev/hsyx3952501/jcl-cobol-git.git
|
|
|
|
REM 推送到 main 分支
|
|
echo.
|
|
echo Pushing to %REMOTE_URL% ...
|
|
git push -u origin main
|
|
|
|
if %errorlevel% equ 0 (
|
|
echo.
|
|
echo === Push successful ===
|
|
) else (
|
|
echo.
|
|
echo === Push failed (RC=%errorlevel%) ===
|
|
echo You may need to: git pull --rebase origin main
|
|
)
|
|
|
|
endlocal
|