Text of cli.github.com › manual › gh_pr_update-branch as Styx crawled it on Nov 19, 2026. The page may have changed since. Only its words are kept, without pictures or layout.

Open the live page

GitHub CLI | Take GitHub to the command line

CLI manual gh pr update-branch gh pr update-branch [<number> | <url> | <branch>] [flags] Update a pull request branch with latest changes of the base branch. Without an argument, the pull request that belongs to the current branch is selected. The default behavior is to update with a merge commit (i.e., merging the base branch into the PR's branch). To reconcile the changes with rebasing on top of the base branch, the --rebase option should be provided.

Options --rebase Update PR branch by rebasing on top of latest base branch Options inherited from parent commands -R , --repo <[HOST/]OWNER/REPO> Select another repository using the [HOST/]OWNER/REPO format Examples $ gh pr update-branch 23 $ gh pr update-branch 23 --rebase $ gh pr update-branch 23 --repo owner/repo See also gh pr