38 lines
828 B
Batchfile
38 lines
828 B
Batchfile
@echo off
|
|
chcp 65001 >nul
|
|
echo ========================================
|
|
echo Git 上传脚本 - Rader_Success_5
|
|
echo ========================================
|
|
echo.
|
|
|
|
set GIT_PATH="C:\Program Files\Git\bin\git.exe"
|
|
set REMOTE_URL=http://lmhrt.cn:6771/ming/Rader_IQ
|
|
|
|
echo [1/5] 检查 Git 状态...
|
|
%GIT_PATH% status
|
|
echo.
|
|
|
|
echo [2/5] 添加所有文件到暂存区...
|
|
%GIT_PATH% add -A
|
|
echo.
|
|
|
|
echo [3/5] 提交更改...
|
|
set /p commit_msg="请输入提交信息 (默认: Update project): "
|
|
if "%commit_msg%"=="" set commit_msg=Update project
|
|
%GIT_PATH% commit -m "%commit_msg%"
|
|
echo.
|
|
|
|
echo [4/5] 拉取远程代码...
|
|
%GIT_PATH% pull
|
|
echo.
|
|
|
|
echo [5/5] 推送到远程仓库...
|
|
%GIT_PATH% push
|
|
echo.
|
|
|
|
echo ========================================
|
|
echo 上传完成!
|
|
echo ========================================
|
|
echo.
|
|
pause
|