git查看配置信息,命令:$ git config --list
1. 查看用户名
$ git config user.name
2. 查看邮箱
$ git config user.email
3. 修改当前的用户名:
$ git config user.name "username"
4. 修改当前的邮箱:
$ git config user.email "email"
注意:如果你要修改当前全局的用户名和邮箱时,需要在上面的两条命令中添加一个参数,–global,代表的是全局。
$ git config --global user.name 'username'
$ git config --global user.email 'email'