New operation to un-merge a pull request (= reset --hard HEAD^) #20823
Replies: 3 comments 3 replies
-
not very sure if I'm getting it correctly, but there is the button to undo a merge pull request on GitHub Web UI |
Beta Was this translation helpful? Give feedback.
-
Well, with your alternative method, if we want to unmerge the commit followed by other commits, we need to do unmerge all the commits to the last commit, and then merge the unmerged commit except the commit you want to unmerge exactly. To unmerge a pull request, we just click Revert button that creates a new PR with revert commit as you mentioned. |
Beta Was this translation helpful? Give feedback.
-
FWIW, I hit this too when changing the merge base of the PR. I had forgotten I had auto-merge enabled and changed the base to another branch which proceeded to auto-merge. I now have a PR stuck in merged which cannot reflect the desired state (open, unmerged). I pushed the correct details to unmerge as suggested in this post. But that doesn't change the PR. A partial fix might be just disabling auto-merge when changing the base. |
Beta Was this translation helpful? Give feedback.
-
Sometimes we merge a pull request too soon.
The current way to undo is to reset the target branch in a local environment, and force-push.
Unfortunately, the pull request remains in "merged".
As an alternative, I want to propose the following:
Beta Was this translation helpful? Give feedback.
All reactions