用户名和邮箱地址是本地 Git 客户端的一个变量 . 用户每次提交代码都会记录用户名和邮箱 .
设置 Git 的用户和邮箱
Git config [--local | --global | --system] user.name 'Your name' 注意这里 user.name 后边是空格, 不是等号 =.
- Git config [--local | --global | --system] user.email 'Your email'
- ## 查看配置
- Git config --list [--local | --global | --system]
- ## 区别
local: 区域为本仓库
global: 当前用户的所有仓库
system: 本系统的所有用户
来源: http://www.bubuko.com/infodetail-2911665.html