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
  • 6,448
  • 24
  • 80
  • 163

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
  • 27,626
  • 16
  • 90
  • 108