Commit with wrong username to github

前端 未结 2 1213
有刺的猬
有刺的猬 2021-02-04 18:09

If I committed to github with a wrong local credentials (username and password), will it be possible to change the committer name on github? This issue can happen if you have tw

2条回答
  •  你的背包
    2021-02-04 18:25

    1- configure your new username and email with

    change username: git config username.user

    change email: git config username.email

    2- run this command git commit --amend -C HEAD --reset-author

    3- run this command git push --force

    This will change the other in the last commit.

提交回复
热议问题