I want to edit previous commit messages, not just the last one. Can I do this using the rebase dialog in Intellij?
Asked
Active
Viewed 1.7k times
1 Answers
7
I worked out how to do it but it seems long winded. Choose interactive rebase onto master, then 'edit' on the commit whose message you want to edit.
This is where you should be able to amend a commit in the commit dialog, but you can't because there's nothing to commit.
So you have to go to the command line and do git commit --amend
, then git rebase --continue
.
Update: You can use 'reword' instead, see comments below.

eggbert
- 3,105
- 5
- 30
- 39
-
9In IntelliJ 14, you can select 'reword' instead of 'edit', and that will allow you to edit the commit messages directly. Source: https://www.jetbrains.com/idea/help/rebasing-commits-dialog.html. – Dez Aug 19 '15 at 15:06
-
2Link to the help page is updated: https://www.jetbrains.com/help/idea/2016.1/interactive-rebase-dialog.html – ljubomir Apr 20 '16 at 16:07
-
Caution !!! Tried this approach (See link in comment before) and no dialog opened for me. After the rebase my commit was completely gone and wasn't able to restore it! Thankfully it was just a minor change. – Recek Oct 10 '16 at 09:31
-
1Works with the Reword option on IntelliJ Ultimate 2016.2. @eggbert, could you please update your answer so that the solution is in the answer itself and not in the comment? Thanks. – Patkos Csaba Oct 14 '16 at 09:49
-
For anyone wondering how to reword the commit, go to VCS -> Git -> Show History... on the new window that will open select the commit and press Ctrl+Shift+A and look for "reword". Hit enter and then edit your commit. – jrsall92 Oct 09 '17 at 10:05