文件种类
- 仓库级别(当前仓库有效) 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:UsersAdministrator 目录下的 .gitconfig 中
仓库级别的配置
git config user.name 'JiYu'
git config user.email 'jiyu_nh@163.com'
- 配置信息会保存在当前仓库目录下的 .git/config 中
查看配置信息
git config --local -l
编辑配置文件
git config --local -e