0

i am trying to revert a commit but getting this error:

error: commit c89902d4bda1937ebb30c265758996c478f4bafa is a merge but no -m option was given.

fatal: revert failed

Not sure what to do. Please help.

raju
  • 5,758
  • 17
  • 61
  • 136

1 Answers1

0

To revert a merge commit you need to specify --mainline parent-number or -m parent-number, can you try the following command:

git revert -m1 <commit-id>
Arpit Aggarwal
  • 24,784
  • 14
  • 83
  • 102