Commit with wrong username to github

前端 未结 2 1197
有刺的猬
有刺的猬 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:43

    You can change the last commit locally with

    git commit --amend --author="Author Name "
    

    Then do a

    git push --force
    

    This will force the authored commit over the top of the old one.

提交回复
热议问题