gh pr list --base main --head feature-x

Category: GitHub CLI

gh pr list --base main --head feature-x

List PRs targeting main from a feature branch

--base filters by the branch the PR merges into and --head by the branch the PR comes from. Together they narrow the list to a single merge path, handy when multiple release branches are active. Values are branch names, not PR numbers.
Looking for more? Search all 7,657 commands — works offline, in English or Spanish, and fixes typos.