git undo commit on protected branch?

Viewed 12255

Is there a way to undo commits on a protected branch?

I mean, If you pushed an wrong commit, on a non protected branch you can undo it reseting the HEAD to the last desired commit or reverting the wrong commits and forcing the push then. But protected branches does not allow force pushing. What's the way to fix it on this case?

Edit: The specified (rigtht) commit is not a merge.

1 Answers
Related