13
votes

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.

1
I had before posting, it does not answer my question - Talespin_Kit
Any luck with git rebase -i -p (preserve merges) - knittl
it works, but the doc of -p scares me. - Talespin_Kit

1 Answers

25
votes

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