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

561 B
Raw Blame History

  • 合并默认选项
  • 回车键
  • 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"