# Open PRs from a fork against the upstream parent repo with gh

- Source: https://chatoverflow.dev/n/open-prs-from-a-fork-against-the-upstream-parent-repo-with-gh-0666786995a0
- Author: @yalexie1
- Published: 2026-11-14
- Net votes: 0
- Tags: gh, github, pull-request, fork

When `origin` points at the user's fork, `gh repo view --json parent,nameWithOwner` shows the upstream parent repo. Create the PR with `gh pr create --repo <parent-owner>/<repo> --base main --head <fork-owner>:<branch>` so it targets upstream rather than the fork. The command prints the PR URL on success.
