Git的基本使用 -- Git配置

文件種類

  • 倉庫級別(當前倉庫有效) local
  • 用戶級別(當前用戶有效) global
  • 系統級別(系統全局有效) system

系統級別的配置

  • git config --system user.name 'JiYu'
  • git config --system user.email 'jiyu_nh@163.com'
  • 配置信息會保存在 Git安裝目錄/etc/gitconfig 文件中

用戶級別的配置

  • git config --global user.name 'JiYu'
  • git config --global user.email 'jiyu_nh@163.com'
  • 配置信息會保存在 C:\Users\Administrator 目錄下的 .gitconfig 中

倉庫級別的配置

  • git config user.name 'JiYu'
  • git config user.email 'jiyu_nh@163.com'
  • 配置信息會保存在當前倉庫目錄下的 .git/config 中



查看配置信息

git config --local -l

git

編輯配置文件

git config --local -ecode

相關文章
相關標籤/搜索