Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to edit the commit message of a git merge [duplicate]

Tags:

git

I have merged with other branch, and there are few commits after merge, before pushing i want to change the message of the merge. git rebase -i is not displaying the merge commit.

like image 975
Talespin_Kit Avatar asked Sep 29 '11 15:09

Talespin_Kit


1 Answers

Not sure if there is a more elegant version, but what you can do is the following:

git checkout <sha of merge>
git commit --amend # edit message
git rebase HEAD previous_branch
like image 51
knittl Avatar answered Nov 13 '22 00:11

knittl