当前位置:   article > 正文

git配置用户名和邮箱_git config --global user.email

git config --global user.email

局部配置,针对具体项目,在项目目录下运行命令:

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的提交记录中会包含提交者的用户名和邮箱,而且不同项目可能也要用到不同的用户名或邮箱,如公司和个人项目可能就需要区分。

如果配置了全局用户名邮箱,则对所有项目生效。如果项目配置了局部用户名邮箱,则会覆盖掉全局配置,项目会优先采用局部配置的信息。

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/笔触狂放9/article/detail/465338
推荐阅读
相关标签
  

闽ICP备14008679号