![](/img/trans.png)
[英]How do I get the PR information from a branch that's been merged to master using the Github API?
[英]How do I get commits from a merged and reverted PR into a new one?
简而言之,我处于以下情况:
创建了一个功能分支,工作了一段时间,收集了大约30个提交,然后合并到master
。 然后通过GitHub的Web界面还原合并(通过创建一个新的PR来还原旧的PR的效果)。
现在,我已经解决了导致我们还原合并的问题,并且我想创建一个新PR,同时包含原始PR中的所有30个左右的提交以及我的修复。
我已经将我的feature-fix分支建立在feature分支的(未合并)头上,再次提交了几次,然后推动创建PR-但由于某种原因,PR只选择了新提交,而不是旧的。
如何在新的PR中包含旧提交?
我不得不回购推送权限(我们使用的是共享的回购模式 )等几乎不需要力,推到任何操作master
都OK。
简化的git历史记录:
* [feature-fix] <-- This is the branch I want to pull from now
| * [master]
| * [merge revert PR]
* |\
| | * [revert PR]
* |/ <-- This is the first commit included in the new PR by github
| * [merge PR]
|/|
* | [feature] <-- This is where the original PR came from
| |
* | <-- I want these commits, originally included in the old PR, to be included
* | in my new PR too.
| |
* | <-- Started work on feature here. This is the first commit I want to include.
\|
* <-- Common ancestor between `feature-fix` and `master`, as far as I can see
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.