32 lines
603 B
Markdown
32 lines
603 B
Markdown
# 04. Git 身份配置
|
|
|
|
## 检查
|
|
|
|
```bash
|
|
git config --global user.name
|
|
git config --global user.email
|
|
```
|
|
|
|
✅ 达标:name 是你的中文名(如 星月、小墨),email 是 `name@shazhou.work`
|
|
|
|
## 安装
|
|
|
|
```bash
|
|
# 替换为你的信息
|
|
git config --global user.name "星月"
|
|
git config --global user.email "xingyue@shazhou.work"
|
|
|
|
# 推荐设置
|
|
git config --global init.defaultBranch main
|
|
git config --global pull.rebase true
|
|
git config --global push.autoSetupRemote true
|
|
```
|
|
|
|
## 验证
|
|
|
|
```bash
|
|
git config --global --list | grep user
|
|
# user.name=星月
|
|
# user.email=xingyue@shazhou.work
|
|
```
|