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"