You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+20Lines changed: 20 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -12,6 +12,8 @@ In bigger projects with many files it also provides **context**, it gives you a
12
12
13
13
- Working tree comparison against any chosen branch, tag, or commit
14
14
15
+
-**Compare GitHub Pull Requests** - Enter a PR URL to quickly view and compare PR changes without leaving VS Code
16
+
15
17
- Switch between tree and list view
16
18
17
19
- 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
34
36
35
37
<imgsrc="screenshots/move-view.gif"alt="Moving of Git Tree Compare view between containers"width="256" />
36
38
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
+
37
57
## Settings
38
58
39
59
`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