gitconfig/README.md

79 lines
1.8 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

明白了,以下是根据你提供的脚本和文件,撰写的一份**完善的 Git 中文化配置文档**,适合直接放入 `README.md` 或部署页面说明中:
# Git 安装与配置说明(含中文汉化)
## 📦 安装 Git
1. 下载 `Git-2.36.1-64-bit.exe` 安装包。
2. 双击运行,按照提示默认路径安装(建议不要修改路径)。
---
## ⚙️ 配置 Git
### 1. 确保默认安装路径
请确保 Git 安装在默认目录:
```
C:\Program Files\Git
```
否则 bat 脚本可能无法正确执行。
---
### 2. 下载并运行配置脚本
1. 下载以下文件:
* `copy.bat`(配置脚本)
* `zh_cn.msg`Git GUI 中文语言包)
2. **右键“copy.bat”选择“以管理员身份运行”。**
---
### 3. 脚本功能说明
运行 `copy.bat` 后将执行以下操作:
* ✅ 提示输入 Git 用户名与邮箱,并自动写入全局配置:
```bash
git config --global user.name "你的名字"
git config --global user.email "你的邮箱"
```
* ✅ 自动下载并复制中文语言包 `zh_cn.msg` 至 Git GUI 语言目录:
```
C:\Program Files\Git\mingw64\share\git-gui\lib\msgs\
```
* ✅ 配置完成后自动提示,并延时关闭窗口。
---
## 🧪 验证效果
1. 打开「Git GUI」。
2. 菜单或界面内容将自动切换为中文显示。
---
## 📎 文件列表说明
| 文件名 | 说明 |
| ----------------------- | ------------- |
| `Git-2.36.1-64-bit.exe` | Git 安装程序 |
| `copy.bat` | 一键配置用户名、邮箱及汉化 |
| `zh_cn.msg` | Git GUI 中文语言包 |
| `README.md` | 当前文档说明文件 |
---
如需进一步定制配置,请参考 Git 官方文档:[https://git-scm.com/doc](https://git-scm.com/doc)