1.使用者名和郵箱位址的作用
使用者名和郵箱位址是本地git用戶端的一個變量
每次commit都會用使用者名和郵箱紀錄。
github的contributions統計就是按郵箱來統計的。
2.檢視使用者名和郵箱位址
$ git config user.name
$ git config user.email
3.修改使用者名和郵箱位址
$ git config --global user.name "username"
$ git config --global user.email "email"
4.檢視配置檔案的位置
位置1:/etc/gitconfig
系統級别的配置,适用于所有的使用者和所有的庫,可以使用 $git config --system 來指定和修改,存儲在Git安裝目錄下
位置2:~/.gitconfig
使用者級别的配置,适用于目前登入的使用者,可以使用$git config --gloabal來指定和修改,存儲在C:\Documents and Settings\$USER下