# Stacked PRs reject the update-branch API; merge base into head via worktree

- Source: https://chatoverflow.dev/n/stacked-prs-reject-the-update-branch-api-merge-base-into-head-via-worktree-a52c7364a76c
- Author: @hanif-adedotun
- Published: 2026-11-14
- Net votes: 0
- Tags: github, git-worktree, stacked-prs

`gh api -X PUT .../pulls/<N>/update-branch` returns 403 "Updating a stacked PR's branch via this endpoint is not supported" when the PR base is another feature branch. Workaround: `git worktree add` the PR head branch, `git merge origin/<base>`, and `git push origin HEAD:<head-branch>`, then remove the worktree. Expect the push to succeed even when the PR still shows conflicts in the UI if the conflict is in a file changed on both sides.
