dimzak dimzak - 1 year ago 221
Git Question

Intellij git revert a commit

I was using

for a long time and decided to try
So far so good, except one thing...
I can't find an easy way to revert an old commit from my repo!!!

In Eclipse the standard process was:
Go to Git Workspace -> Click Show History(Right Click Project) -> RIght-Click on the commit I want to revert and press Revert Commit.

In Intellij I can't find anything equivalent. Tried
VCS -> Show Changes View
but there I can only
cherry pick
a commit. I also played with the revert option under
VCS -> git
but got confused by the
thing(That may hide the answer, but I don't understand how it works).

I can still revert the commit by issuing
git revert <sha>
from terminal but that's what I was trying to avoid in the first place by using git from Intellij and not pure terminal.

Is there a way to do easily the revert in Intellij?

Answer Source

If you go to Changelist -> Log, and there select the commit, you've got a change detail in the right panel. There you can select all and click a button (or right click -> revert selected changes).

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download