git config 查看配置信息
config 配置项帮助信息
$ git config
config 配置有system级别 global(用户级别) 和local(当前仓库)三个设置项
从system-》global-》local 底层配置会覆盖顶层配置 分别使用--system/global/local 可以定位到配置文件
查看系统config: git config --system --list
查看当前用户(global)配置:git config --global --list
查看当前仓库配置信息:git config --local --list
GIT 查看/修改用户名和邮箱地址
用户名和邮箱地址的作用:
用户名和邮箱地址是本地git客户端的一个变量,不随git库而改变。每次commit都会用用户名和邮箱纪录。github的contributions统计就是按邮箱来统计的。
查看用户名和邮箱地址:
$ git config user.name
$ git config user.email
修改用户名和邮箱地址:( 写的时候不用加双引号)
$ git config --global user.name "username"
$ git config --global user.email "email"