Create your new branch using:
git checkout -b branch-3 branch-1
git merge branch-2
This creates a branch that has changes from both your pending branches. Two things are most likely to happen after that point.
You will want to pick up changes from master
, including merging of your PRs. Just do a git merge master
from branch-3
to pick up those changes.
You will be asked to make changes to one or both of your pending PRs. In that case, make the changes on the PR's branch, then git merge branch-1
from branch-3
to pick up those changes.
There are other much less-likely scenarios (assuming you were asked to make the changes by the people who control the repo), like one PR being rejected outright while the other one is accepted into master
. In those cases, you'd probably want to do something like git rebase --onto master branch-2
, and deal with the big mess.