How do I edit or reword a merge commit\'s message?
git commit --amend works if it\'s the last commit made (HEAD), but what if it comes befo
The git rebase -i HEAD~5 command pops up the editor. It lists the specified commits (in this case five of them). The first column contains pick for every commit. Just replace pick with reword in that editor and save+close the editor. Then git will pop up the editor for every commit where you changed pick to reword and will let you edit the commit message.