修改git全局初始化的用户名和邮箱

  修改用户名和邮箱地址:

$ git config --global user.name "谁修改的(name)" 
$ git config --global user.name "your email of gitHub/Gitee " 

  如果用户名或邮箱设置错误,再次使用相同命令设置,如果出错的话,可以尝试以下方式:

  使用--replace-all来修改全局初始话的用户名和密码:

  修改用户名:

$ git config --global --replace-all user.name "xxxx"  

  修改邮箱账号

$ git config --global --replace-all user.email "gitHub/Gitee邮箱账号"

 可以使用:git config user.name命令来查看修改

$ git config user.name

如果不想每次pull/push时输入用户名和密码,可以使用命令:

$ git config --global credential.helper store

猜你喜欢

转载自blog.csdn.net/Tingting_Wang152/article/details/85221658
今日推荐