feat: 快速提交 - 周一 2025/09/22 13:18:51.04

This commit is contained in:
赵杰 Jie Zhao (雄狮汽车科技)
2025-09-22 13:18:51 +01:00
parent 91a86a1f4f
commit 8176caa338
3 changed files with 95 additions and 7 deletions

View File

@@ -27,9 +27,20 @@ if /i "%confirm%" neq "y" (
exit /b 0
)
:: 添加所有更改
:: 检查是否有更改需要提交
echo.
echo [2/4] 添加所有更改到暂存区...
echo [2/4] 检查更改状态...
git diff --quiet && git diff --cached --quiet
if %errorlevel% equ 0 (
echo 没有检测到任何更改,无需提交
echo.
echo ✅ 工作区干净,无需推送
pause
exit /b 0
)
:: 添加所有更改
echo 添加所有更改到暂存区...
git add .
if %errorlevel% neq 0 (
echo ❌ 添加文件失败
@@ -152,6 +163,16 @@ echo [4/4] 推送到远程仓库...
git push origin main
if %errorlevel% neq 0 (
echo ❌ 推送失败
echo 💡 可能的原因:
echo - 网络连接问题
echo - 远程仓库权限不足
echo - 分支冲突
echo - 需要先拉取远程更改
echo.
echo 🔧 建议解决方案:
echo 1. 检查网络连接
echo 2. 运行: git pull origin main
echo 3. 重新运行推送脚本
pause
exit /b 1
)