git配置用户名和邮箱
局部配置,针对具体项目,在项目目录下运行命令:git config user.name "worker95"git config user.email "worker95@work.com"查看项目的局部配置,在项目目录下运行:git config user.namegit config user.email全局配置(只是多了一个--global参数):git config --global us
·
局部配置,针对具体项目,在项目目录下运行命令:
git config user.name "worker95"
git config user.email "worker95@work.com"
查看项目的局部配置,在项目目录下运行:
git config user.name
git config user.email
全局配置(只是多了一个--global参数):
git config --global user.name "user95"
git config --global user.email "user95@foxmail.com"
查看全局配置:
git config --global user.name
git config --global user.email
Git的提交记录中会包含提交者的用户名和邮箱,而且不同项目可能也要用到不同的用户名或邮箱,如公司和个人项目可能就需要区分。
如果配置了全局用户名邮箱,则对所有项目生效。如果项目配置了局部用户名邮箱,则会覆盖掉全局配置,项目会优先采用局部配置的信息。
更多推荐
已为社区贡献1条内容
所有评论(0)