chore: 删除git.bat脚本文件
This commit is contained in:
12
Git提交方法.md
12
Git提交方法.md
@@ -1,11 +1,11 @@
|
||||
# Git 提交和推送成功方法
|
||||
|
||||
## 项目配置信息
|
||||
|
||||
注意本文件涉及认证,不上传git!!!!
|
||||
- **远程仓库地址**: `http://lmhrt.cn:6771/ming/Rader_IQ.git`
|
||||
- **主分支**: `main`
|
||||
- **Git 路径**: `C:\Program Files\Git\bin\git.exe`
|
||||
|
||||
- **Git 认证URL格式**: `"C:\Program Files\Git\bin\git.exe" remote set-url origin http://ming:mq20221109@lmhrt.cn:6771/ming/Rader_IQ.git`
|
||||
## 方法一:使用 git.bat 脚本(推荐)
|
||||
|
||||
### 脚本位置
|
||||
@@ -65,12 +65,12 @@
|
||||
|
||||
**解决方案**:
|
||||
```powershell
|
||||
# 方案1:配置凭据存储
|
||||
& "C:\Program Files\Git\bin\git.exe" config --global credential.helper store
|
||||
# 方案1:在 URL 中包含认证信息
|
||||
& "C:\Program Files\Git\bin\git.exe" remote set-url origin http://ming:mq20221109@lmhrt.cn:6771/ming/Rader_IQ.git
|
||||
& "C:\Program Files\Git\bin\git.exe" push
|
||||
|
||||
# 方案2:在 URL 中包含认证信息
|
||||
& "C:\Program Files\Git\bin\git.exe" remote set-url origin http://用户名:密码@lmhrt.cn:6771/ming/Rader_IQ.git
|
||||
# 方案2:配置凭据存储
|
||||
& "C:\Program Files\Git\bin\git.exe" config --global credential.helper store
|
||||
& "C:\Program Files\Git\bin\git.exe" push
|
||||
```
|
||||
|
||||
|
||||
37
git.bat
37
git.bat
@@ -1,37 +0,0 @@
|
||||
@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
|
||||
Reference in New Issue
Block a user