gh pr diff

See the changes of a pull request

What it does

gh pr diff prints all the changes of a pull request in git diff format without switching branches. With no number, the current branch's PR.

--name-only leaves just the list of changed files: a quick way to see what is touched. The output can go on through a pipe, into grep for instance.

Syntax

gh pr diff <number>
gh pr diff <number> --name-only

Examples

Related commands

Practise · All commands