How to change the commit author for one specific commit?

后端 未结 19 2168
没有蜡笔的小新
没有蜡笔的小新 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 05:58

    In furtherance to Eugen Konkov answer, to start from the root commit, use --root flag. The --no-edit flag is helpful too, because with it you are not prompted into an editor for each commit.

    git rebase --root --exec "git commit --amend --author='name ' --no-edit"
    

提交回复
热议问题