How to change the commit author for one specific commit?

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

    For the merge commit message, I found that I cannot amend it by using rebase, at least on gitlab. It shows the merge as a commit but I cannot rebase onto that #sha. I found this post is helpful.

    git checkout 
    git commit --amend # edit message
    git rebase HEAD previous_branch
    

    This three lines of code did the job for changing the merge commit message (like author).

提交回复
热议问题