配置user.name和user.email

  1. git config --global user.name 'user_name'
  2. git conbfig --golbal user.email 'user_email'

config的三个作用域

  1. git config --local //只对某个仓库有效
  2. git config --global // global对当前用户所有仓库有效
  3. git config --system // 对系统所有登录的用户有效

显示config配置

  1. git config --list --local
  2. git config --list --golbal
  3. git config --list --system

—local命令只能在git仓库内部使用

清除配置

  1. git config --unset --local user.name
  2. git config -unset --global user.name
  3. git config --unset --system user.name

优先级

local > global > system