Skip to content

Commit f1747c2

Browse files
Copilotletmaik
andcommitted
Add documentation for GitHub PR comparison feature
Co-authored-by: letmaik <530988+letmaik@users.noreply.github.com>
1 parent aa469a6 commit f1747c2

1 file changed

Lines changed: 20 additions & 0 deletions

File tree

README.md

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@ In bigger projects with many files it also provides **context**, it gives you a
1212

1313
- Working tree comparison against any chosen branch, tag, or commit
1414

15+
- **Compare GitHub Pull Requests** - Enter a PR URL to quickly view and compare PR changes without leaving VS Code
16+
1517
- Switch between tree and list view
1618

1719
- Compare in merge or full mode
@@ -34,6 +36,24 @@ By default, the tree view is located in its own container accessible from the ac
3436

3537
<img src="screenshots/move-view.gif" alt="Moving of Git Tree Compare view between containers" width="256" />
3638

39+
## Compare GitHub Pull Requests
40+
41+
You can quickly view GitHub PR changes directly in VS Code using the **Compare GitHub Pull Request** command:
42+
43+
1. Click the "..." menu button in the Git Tree Compare view title bar
44+
2. Select **Compare GitHub Pull Request...**
45+
3. Enter the GitHub PR URL (e.g., `https://github.com/owner/repo/pull/123`)
46+
4. Authenticate with GitHub if prompted (uses VS Code's built-in GitHub authentication)
47+
5. The extension will:
48+
- Fetch the PR's head commit
49+
- Checkout the PR branch
50+
- Compare it against the PR's base branch
51+
- Display all changes in the tree view
52+
53+
This feature works with both PRs from the same repository and PRs from forks. If you have uncommitted changes, you'll be prompted to confirm before checking out the PR.
54+
55+
**Note:** This will checkout the PR in detached HEAD state. You can switch back to your previous branch using the Source Control view or by running `git checkout <branch-name>` in the terminal.
56+
3757
## Settings
3858

3959
`gitTreeCompare.diffMode` Determines how the comparison is performed, either by computing a merge base commit first and then comparing against that (equivalent to pull request diffs, default), or by comparing directly to the given base (useful to see the exact diff).

0 commit comments

Comments
 (0)