Git的基本使用 -- Git配置

文件种类

  • 仓库级别(当前仓库有效) local
  • 用户级别(当前用户有效) global
  • 系统级别(系统全局有效) system

系统级别的配置

  • git config --system user.name 'JiYu'
  • git config --system user.email '[email protected]'
  • 配置信息会保存在 Git安装目录/etc/gitconfig 文件中

用户级别的配置

  • git config --global user.name 'JiYu'
  • git config --global user.email '[email protected]'
  • 配置信息会保存在 C:\Users\Administrator 目录下的 .gitconfig 中

仓库级别的配置

  • git config user.name 'JiYu'
  • git config user.email '[email protected]'
  • 配置信息会保存在当前仓库目录下的 .git/config 中



查看配置信息

git config --local -l

编辑配置文件

git config --local -e




猜你喜欢

转载自www.cnblogs.com/jiyu-hlzy/p/12194514.html