问题描述
基本上我使用来恢复以前的PR一个特性分支转换为 master
,然后我决定合并早先恢复的同一个特性分支,但我是无法这样做。步骤如下:
- PR将功能分支合并到
master $ c
- 从(
master
)还原PR合并
- 尝试创建新的PR将功能分支再次合并到
master
。
- 得到以下消息:
- 从(
关于如何将功能分支再次合并到 master
只需恢复回复。所以通过点击回复按钮,您将创建一个新的PR(您的第2步)。合并后,您可以选择恢复此操作,这将创建一个新的分支,并返回所有更改。然后,您可以拉取该分支,对其进行更改(如果需要)并创建新的PR。您将失去Github上的所有提交消息,但所有文件更改仍将在周围。很好地引用您的原始分支,并在新公关中恢复。
任何事情都可以避免复杂的资产分配或推动力量。
Basically I used Github revert button to revert a previous PR for a feature branch into master
, then I decided to merge the same feature branch that I reverted earlier, but I was not able to do so. Steps as follow:
- PR to merge feature branch to
master
- Revert PR merge from (
master
) - Tried to create new PR to merge feature branch to
master
again. - Got this message:
Any suggestions on how can I merge feature branch again into master
Just revert the revert. So by clicking the revert button you will have created a new PR (your step 2). Once this is merged, you will have the option to revert this, which will create a new branch with all your changes back in. You can then pull this, make changes to it (if needed) and create a new PR. You will lose all the commit messages on Github, but all file changes will still be around. Good to refer to your original branch and reverts in the new PR.
Anything to avoid a complicated rebase or force pushing to master.
这篇关于如何使用Github Revert Button恢复PR后再次进行PR和合并的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!