Search code examples
eclipsegitegitjgitgit-revert

Can EGit revert a merge commit?


When I try to revert a merge commit using EGit 4.1.1 I get the following error:

enter image description here

Using Git on the bash, I can do the following git revert -m 1 f28ce5817da19f61110a3b794dcde50ea72341e9 and it works fine.


Solution

  • As you can see from the error message, apparently EGit cannot revert merge commits (i.e. commits with more than one parent).

    The equivalent for -m 1, a dialog that asks you to select the mainline commit, for example, is missing.

    You may want to open an enhancement request for EGit to support reverting commits with more than one parent.