sincecutoff.com
← all changes

gh pr diff excludes selected files from diff output

Introduced 2026-03-10 · score 0.94

HOW TO USE IT

When reviewing a pull request, run `gh pr diff` with `--exclude` for each glob pattern to omit matching files from the diff output.

gh pr diff <number> --exclude '*.yml' --exclude 'generated/*'

WHY THIS HELPS

Review a pull request diff while omitting selected files from its output.

REQUIREMENTS AND LIMITATIONS

  • Version: v2.88.0
  • <number>: Pull request number; without an argument, selects the pull request for the current branch.
  • -e, --exclude <patterns>: Exclude files matching glob patterns; repeat the flag for multiple patterns. Patterns use forward slashes as path separators on all platforms.

FIRST-PARTY EVIDENCE

Check the installed version and the source before using it. Entry JSON

Report a problem with this card