【问题标题】:How to change Author name in Git [duplicate]如何在 Git 中更改作者姓名 [重复]
【发布时间】:2021-05-18 02:49:24
【问题描述】:

我在 GitHub 中更改了我的用户名。我对我的 Git 做了一些提交,并输入了命令 >git log 来查看我的提交。在作者部分,它仍然显示我以前的用户名。如何更改/更新我在 Git 上的当前用户名?它也应该在提交后反映在作者部分。

> git log
commit commitId (HEAD -> master)
Author: **My previous username** <My email id>
Date:   Sun Feb 14 16:39:26 2021 +0530

【问题讨论】:

标签: git


【解决方案1】:
git config --global user.name "John Doe"
git config --global user.email johndoe@example.com

见git first time setup

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2021-02-08
    • 1970-01-01
    • 2021-02-13
    • 2023-01-09
    • 2018-11-21
    相关资源
    最近更新 更多