Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Reverting multiple commits in IntelliJ

My question is the same as

Reverting many commits in IntelliJ by one commit

but more specific. In the linked question, it asks how to revert many commits at once in IntelliJ or by command line... since all feasible answers regard command line, I ask you how to revert more than one commit at once using only IntelliJ. I assume that the commits can be distributed in history and not consecutive.

I need to know how commit can be reverted at once, with only one operation.

like image 663
Lore Avatar asked Oct 28 '25 14:10

Lore


2 Answers

Just select all commits in the history

enter image description here

then revert commits (not worked for my colleague, so I was misleaded!).

like image 196
Lore Avatar answered Oct 31 '25 03:10

Lore


The "Undo changes in Git repository" only mention locating the commit you want to revert in the Log tab of the Git tool window Alt+9, right-click it and select Revert Commit from the context menu.
(This option is also available from the context menu of a commit in the file History view)

Check if you can select multiple commits in that view.

IDEA-174407 mentions

When several commits selected, Git Revert action start reverting from the oldest commit but should start at the latest.

So that should be possible.

like image 27
VonC Avatar answered Oct 31 '25 04:10

VonC



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!