What changing the base branch actually does
You opened a pull request, and the diff is wrong.
Maybe it shows changes that belong to another feature, or it is missing work you expected to see.
The branch you are comparing against is not the one you meant.
GitHub does let you change the base branch of an open pull request.
The useful question is whether that edit gives you the comparison you need without losing review context you care about.
The base branch is the branch your pull request compares its changes against.
When you change it, GitHub compares your branch against a different target.
According to GitHub's documentation on changing the base branch, the purpose is to compare changes against a different branch and ensure accurate updates.
That is the intended benefit, not a guarantee that every diff will look right afterward.
The same page carries a warning worth reading before you click anything.
Some commits may be removed from the timeline.
Review comments may also become outdated, because the line of code a comment referenced may no longer be part of the changes in the pull request.
Those two consequences are the real cost of retargeting.
They are documented, not hypothetical.
Why the comparison can drift in the first place
GitHub's documentation includes a detail that explains a lot of confusion.
When you open a pull request, GitHub sets the base to the commit that branch references at that moment.
If the base branch is updated later, GitHub does not update the base branch's commit for that pull request.
So the comparison you see is tied to a point in time, not to whatever the branch looks like today.
That does not mean every stale-looking diff requires a base change.
It does mean the base is a specific reference, and retargeting is one way to point the comparison somewhere else.
The two checks that decide it
Before you change anything, run two checks.
Each one can point you in a different direction.


