找到你的.git的目录下,右键空白位置找到“Git Bash”呼出命令行:

设置用户名
命令格式:git config user.name "name"
例:git config user.name "hello"
验证方式
git config user.name ---验证用户名
设置邮箱地址
命令格式: git config user.email 邮箱地址
例:git config user.email hello.qq.com
验证邮箱
git config user.email
在../.git/config文件中就会多出:
[user]
name = hello
email = hello@qq.com
修改git用户名和邮箱
git config --global user.name "your name"
git config --global user.email "your email"