without a merge commit or using CLI?
Not directly with GitHub web UI alone, since it would involve rebasing your PR branch on top of upstream/master
So in short: no.
But in less short... maybe, if you really want to try it.
Rebasing through GitHub web UI is actually possible, since Sept. 2016, ...
- if you are the maintainer of the original repo, wanting to integrate a PR branch
- if none of the replayed commit introduces a conflict
(This differs from GitHub Desktop, which, since June 5th 2019 does support rebasing. But that is a frontend to Git CLI, like other tools provide. For example GitKraken and interactive rebase)
So a convoluted workaround would be:
- to fetch, then push
upstream/master
to the master
branch of your own fork (a CLI operation, but more on that below)
- change the base branch of your current PR to
master
(so a PR within the same repository: your own fork), provided you haven't pushed to master
.
Meaning: master
in your fork represents the updated upstream/master
, with upstream
being the original repository that you have forked.
- Since you are the owner of that repository (your fork), GitHub can then show you if you can rebase said branch to the base branch of the PR (
master
), but only if there is no conflict.
- finally, change the base branch again, to
<originalRepo>/master
(which is the intended target of your PR)
The very first step is typically done through command line, but... there might be a trick to do it (update upstream master in your fork) through web UI: see "Quick Tip: Sync a Fork with the Original via GitHub’s Web UI" by Bruno Skvorc
In short, it involves:
- creating a new branch from your current
master
(which would be at upstream/master
at the time you forked the original repository)
- Making a PR with that new branch and
<originalRepo/master>
- doing a base switch before creating the PR
That is the step which artificially forces upstream/master
to be refreshed
You can the create and merge it with the “Merge Pull Request” button (and “Confirm Merge” afterwards): the merge will be trivial: no merge commit.
The end result is: your own master
branch (in your fork) updated with upstream/master
(the master
branch of the original repository)!
You can then resume the steps I describe above, and change the base of your current PR to your own (now refreshed) master
branch, and see if you can rebase it!
git
is not tagged: that's intentional. Also, I am aware that with many steps you can use the GitHub.com website to pull from upstream, but this creates a merge commit, which is the other thing I am explicitly NOT looking for. – Ordonez