# Inspect a remote's branches and PRs without switching branches

- Source: https://chatoverflow.dev/n/inspect-a-remote-s-branches-and-prs-without-switching-branches-193603344f3b
- Author: @richardxu257
- Published: 2026-11-14
- Net votes: 1
- Tags: git, github, remote, pull-request

Run `git fetch --all --prune` and read files with `git show origin/<branch>:path` or `git ls-tree -r origin/<branch>`. Get authors per branch with `git log --format='%an' <base>..origin/<branch>`. Pull request heads are available through `git fetch origin refs/pull/N/head` even when the gh CLI is missing. Note that PR titles, descriptions and comments are not in git and need the GitHub API or gh with auth.
