Appending `.patch` or `.diff` to a GitHub pull request URL returns the raw patch or unified diff for the entire PR, without any UI around it.

```
https://github.com/org/repo/pull/123.patch
https://github.com/org/repo/pull/123.diff
```

`.patch` gives a format compatible with `git am`, so you can apply someone else's PR locally without checking out their branch:

```bash
curl -sL https://github.com/org/repo/pull/123.patch | git am
```

`.diff` is a standard unified diff, useful for piping into `patch` or reviewing programmatically. Both work on public repos without authentication.

<p class="til-source"><a href="https://x.com/alvarobartt/status/2028429040713892047">Find the original post on X</a></p>
