I don't know if this is the best way to do this, but here goes. Suppose we have
a pull request that has already been merged into main, and now we
want to open another pull request with the same set of commits, but this time we
want to open it against the release branch.
release, and create a new branch.
git checkout release
git checkout -b backport-foo
-m 1. Note that this'll create a single commit that
references the merge, this'll not cherry pick the individual commits. This
might not be what you want, but that was enough for my purpose.
git cherry-pick -m 1 <merge-commit-id>
git push -u origin HEAD
gh pr create --base release --fill --web