GIT修改邮箱

git报错-->! [remote rejected] master -> master (push declined due to email privacy restrictions)

报错信息:

! [remote rejected] master -> master (push declined due to email privacy restrictions)

于是百度,所以一下内容容我做一个搬运工 
原文地址:https://stackoverflow.com/questions/43378060/meaning-of-the-github-message-push-declined-due-to-email-privacy-restrictions/43378177 
起因: 
这里写图片描述

我这里不选择关闭上面截图的设置,按照方法继续操作。

1、使用命令查看当前的全局用户E-mail

git config --global user.email

2、找到你github给的推荐E-mail.

在settting里面的Emails。 
这里写图片描述
我的推荐E-mail:23214540+Hitvz@users.noreply.github.com

3、重新设置你的全局用户E-mail

git config --global user.email 你的推荐E-mail

这里使用git config --global -e直接编辑修改

4、重置上次提交的作者信息

git commit --amend --reset-author

输入命令后,进入vi模式,不熟悉的,可以直接在英文输入法下:wq(冒号wq)保存

5、提交

git push

最后给个完整命令截图: 


这里写图片描述
原文地址:https://www.cnblogs.com/konglinqingfeng/p/9637639.html