1.添加
$ git config --global user.name "yourName"
$ git config --global user.email "your@email.com"
2.刪除
git config --global --unset user.name "yourName"
git config --global --unset user.name "yourName"
看添加或刪除是否成功,有兩種方式:
【1】是控制台回車后沒有報錯,即成功。
【2】C盤 --> use(或用戶) --> 電腦用戶 --> .gitconfig;就可以查看。