用戶名和郵箱地址的做用git
用戶名和郵箱地址是本地Git客戶端的一個變量,不隨git庫而改變。github
每次commit都會用用戶名和郵箱紀錄。markdown
github的contributions統計就是按郵箱來統計的。.net
查看用戶名和郵箱地址:code
$ git config user.name $ git config user.email
修改用戶名和郵箱地址:get
$ git config --global user.name "username" $ git config --global user.email "email"