配置 user 信息

配置 user.nameuser.email

$ git config --global user.name 'your_name'
$ git config --global user.email '[email protected]'

config 的三个作用域

缺省等同于 local

$ git config --local # 只对某个仓库有效
$ git config --global # 对当前用户所有仓库有效
$ git config --system # 对系统所有登录的用户有效

# 清除设置
$ git config --unset --local user.name

显示 config 的配置,加上 --list

$ git config --list --local
$ git config --list --global
$ git config --list --system

Other

启用有帮助的彩色命令行输出

$ git config --global color.ui auto