Git [Hub] PR合并请求重新定级

时间:2019-08-29 05:58:33

标签: git github

我知道这个问题被问过多次,但我听不懂。


说我有这棵(自制的)树:

| --- PREVIOUS COMMITS ---
* Bump version to 0.2 [master branch]
| \  Create branch 'featureA' in fork
|  * Implement feature A [featureA branch]
* | Implement feature B [master branch]

我想通过GitHub的Pull Request合并featureA以便掌握,但是“实施功能B”创建了合并冲突,我可以通过GitHub UI来解决。现在我有一个新的合并提交:

| --- PREVIOUS COMMITS ---
* Bump version to 0.2 [master branch]
| \  Create branch 'featureA' in fork
|  * Implement feature A [featureA branch]
* | Implement feature B [master branch]
| * Merge 'master' into featureA [featureA branch]

现在在“请求更改请求”选项卡中,只希望合并我的更改(除外)。但是,当我尝试将合并提交(根据项目所有者的请求)重新设置为上一个合并提交时,它想要重新设置主提交。如果我这样做,它想在上游再次合并所有上游更改。我如何在一次提交中重新构建所有内容,却又不认为应该合并上游内容?

编辑:应该看起来像这样:

| --- PREVIOUS COMMITS ---
* Bump version to 0.2 [master branch]
* Implement feature B [master branch]
* Implement feature A [merged featureA branch]

但是当我什么都不做时会看起来像这样:

| --- PREVIOUS COMMITS ---
* Bump version to 0.2 [master branch]
* Implement feature B [master branch]
* Implement feature A [merged featureA branch]
* Merge 'master' into featureA [merged featureA branch]

0 个答案:

没有答案