Files
Knowledge/1 使用/git/git 初始化 gitinit.md
T

21 lines
561 B
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.
- 合并默认选项
- 回车键
- credential 账号密码记住
```
# 1. 保持原有换行符,不做 CRLF/LF 自动转换
git config --global core.autocrlf false
# 2. pull 时默认使用 rebase(避免产生多余的 merge commit)
git config --global pull.rebase true
# 3. 使用 credential 明文记录账号密码(保存在 ~/.git-credentials)
git config --global credential.helper store
git config --global init.defaultBranch main
# 4. 默认身份
git config --global user.name "cheney"
git config --global user.email "hq@honor3.com"
```