git 提交报错 does not match your user account

出现这个错误的原因是:

因为修改 gituser.nameuser.email 然后 commit 了代码,然后 push 的时候报错。

所以我们修改 gituser.nameuser.email 为要求的值。

git config --global user.name "Your Name"
git config --global user.email "you@example.com"

然后执行以下代码,更新 提交 commit 代码的 author

git commit --amend --reset-author

以上

Logo

瓜分20万奖金 获得内推名额 丰厚实物奖励 易参与易上手

更多推荐