查看、修改本地git用户名和邮箱地址

用户名和邮箱地址的作用

用户名和邮箱地址是本地git客户端的一个变量,不随git库而改变。

每次commit都会用用户名和邮箱纪录。

github的contributions统计就是按邮箱来统计的。

查看用户名和邮箱地址

git config user.name

git config user.email

修改用户名和邮箱地址

git config --global user.name "username"

git config --global user.email "email"

复制代码
git config --global user.name "韧"

git config --global user.email "ren@qzcsbj.com"

修改后的查询结果

相关推荐
℘团子এ3 小时前
git中,项目怎么更换远程仓库连接地址
git
言之。8 小时前
Git Hooks
git
代码AI弗森9 小时前
Git Bash 与 PowerShell:定位差异、使用场景与选择建议
开发语言·git·bash
森叶11 小时前
Git flow command error: ‘flow‘ is not a git command 问题解决
git
天麓12 小时前
git merge 举例
git
AI_567813 小时前
Git冲突治理白皮书:智能标记与可视化协同的下一代解决方案
大数据·人工智能·git·机器学习
念丶小宇14 小时前
Git常用指令
大数据·git·elasticsearch
CSDN_RTKLIB14 小时前
Git Clone
git
中二病码农不会遇见C++学姐14 小时前
.env 文件是干啥的?为什么不能提交到 Git?
git·学习
CoderJia程序员甲15 小时前
GitHub 热榜项目 - 日榜(2026-02-03)
git·ai·开源·llm·github