Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

4
  • if it was an obvious merge mistake, perhaps the administrators of the repo can remove the "protected" flag on main for just the duration of the git push -f ... which would revert the merge. Obviously: have them re-activate the flag right afterwards. Commented Feb 23 at 20:03
  • You said developers can't push to main branches, then how do you revert design-main? Commented Feb 23 at 20:26
  • @KirlFamin I was trying the revert on my local copy of the repo. If revert would result in a flow that fixed the issue without rewriting history,then I could likely get temp ownership of the main branch for the push. Commented Feb 23 at 20:36
  • I strongly advise you to lift the "reset not allowed" limitation temporarily. Otherwise, you will not be able to merge any branches anymore that the wrong merge brought. If you do the reset, be sure to notify your users that they must disregard the wrong merge commit and rebase their work on the old commit. Commented Feb 24 at 10:24