跳转至

配置仓库git用户名和邮箱

配置用户名和邮箱

到仓库根目录

git config user.name "Your Name"
git config user.email "your_email@example.com"

全局级别配置

如果用户有配置仓库级用户名和邮箱,会优先使用仓库级

git config --global user.name "Your Name"
git config --global user.email "your_email@example.com"