I am trying to revert a range of commits where some commits are merge commits. I need the branch in exact copy before these range of "bad" commits (for example, last good commit is "A")
git revert B1^..B10
If some are merge commits, it will return error something like "...not allowed due to a merge but no -m option was given".
If I provide the option -m 1
, it will revert but I am not getting the correct revision of code exactly the same if I checkout commit ID "A".
Note, I do want to keep history so using the reset
command is not an option.