Sorry, your browser cannot access this site
This page requires browser support (enable) JavaScript
Learn more >

写得非常好的官方文档 https://git-scm.com/book/zh/v2/%E8%B5%B7%E6%AD%A5-%E5%88%9D%E6%AC%A1%E8%BF%90%E8%A1%8C-Git-%E5%89%8D%E7%9A%84%E9%85%8D%E7%BD%AE

设置当前git仓库提交的用户名和邮箱

git config user.name yuanzhiqiu
git config user.email zhiqiuyuan@qq.com

检查是否设置成功

git config user.name
git config user.email 

设置之后则在当前仓库commit的用户名和邮箱即是你设置的这个(这是优先级最高的配置,覆盖比如全局的配置)

查看所有git配置

git config --list

评论