在上次提交尚未合并的同一分支上创建新的合并请求

Make a new Pull Request on the same branch where the last commit hasn't been merged yet

好的...情况是这样的:

嗯,我的问题是"How do you make this new commit as a new pull request or lets say pull request #2 but still in the same brach?"

谢谢。

将你的第二次提交放在另一个分支上

# now

A---B---C <<< main-line
         \
          D---E <<< configs

# target

A---B---C <<< main-line
         \
          D <<< configs
           \
            E <<< configs-plus

要做到这一点,一步一步来:

# start from branch configs
git checkout configs

# Create the new branch (by default, it'll point at HEAD, so configs)
git branch configs-plus

# reset current branch (still configs) to last commit
git reset --hard @^

# finally, push (--force (or -f) needed because history has been rewritten)
git push -f origin HEAD

然后创建一个新的 PR configs-plus > main-line。第一个 PR 将通过强制推送更新以删除第二个提交。