Take the following (naive ascii) graph as an example, where c1…3 are commits, b2…3 are branches:
c1 - c2 (b2, upstream/b2)
\
c3 (b3, upstream/b3)
Now I want to merge upstream/b2
into upstream/b3
and let’s suppose there are conflicts. If I directly create a PR in the web UI, the PR will abort on merge conflicts (no further actions can be taken), assuming I don’t have write permission to the upstream/b3
branch (which is the whole point of using a PR at the first place). Now if I resolve the merge conflict locally in c4
, like this (suppose origin/b4
is a remote branch I can create and write to):
c1 - c2 (b2, upstream/b2)
\ \
c3 (b3, upstream/b3) - c4 (b4, origin/b4)
and then submit a PR to merge origin/b4
into upstream/b3
. Then I found that there is NOT a proper “PR merge method” that can simply advance upstream/b3
to origin/b4
- rebase-then-…: doesn’t even work due to conflicts at the rebase step
- create squash commit: gives a duplicated squash commit without proper merge history links
- create merge commit: this is the “closest one” that can work, but adds extra ugly merge links that’s not needed, like this:
c1 - c2 (b2, upstream/b2)
\ \
c3 ------------------- c4 (b4, origin/b4)
\ \
------------------------ c5 (upstream/b3, after merging origin/b4 by "create merge commit")
I think there should be a much more direct submission option to simply fast-forward upstream/b3
to origin/b4
. This is missing in the current setting.