How to change the commit author for one specific commit?

后端 未结 19 2300
没有蜡笔的小新
没有蜡笔的小新 2020-11-22 05:15

I want to change the author of one specific commit in the history. It\'s not the last commit.

I know about this question - How do I change the author of a commit in

19条回答
  •  说谎
    说谎 (楼主)
    2020-11-22 06:00

    Changing Your Committer Name & Email Globally:

    $ git config --global user.name "John Doe"
    $ git config --global user.email "john@doe.org"
    

    Changing Your Committer Name & Email per Repository:

    $ git config user.name "John Doe"
    $ git config user.email "john@doe.org"
    

    Changing the Author Information Just for the Next Commit:

    $ git commit --author="John Doe "
    

    Hint: For other situation and read more information read the post reference.

提交回复
热议问题