1. 查看当前用户名和邮箱

git config user.name
git

2. 设置当前用户名和邮箱

git config --global user.name "somebody"
git config --global user.email "somebody@some.com"

3. 其他参考

看​​这里​