Checkout Pull Request in Worktree still fetches fork head from base remote in 0.174.0
Maintainers usually reply within 1 day
@alexr00 is already working on this.
Since Nov 3, 2026.
Assessment
This issue has not been assessed yet.
Description
- Extension version: GitHub Pull Requests 0.174.0
- VS Code version: 1.144.0
- OS: macOS 15.5, Apple Silicon (arm64)
- Repository clone configuration: fork of an upstream repository, with multiple remotes and linked worktrees
- GitHub product: GitHub.com
Related: #8983, which is closed as completed. This report confirms that the same failure remains reproducible with the installed, unmodified 0.174.0 extension. I have not established whether the fix for #8983 was included in this release.
Steps to reproduce
- Clone a fork and configure remotes such as:
origin: your forkupstream: the repository receiving the PRcontributor: the fork containing the PR's head branch
- Open a PR against the upstream repository whose head branch exists only in the contributor's fork.
- In the GitHub Pull Requests view, choose Checkout Pull Request in Worktree and select a new directory.
- Observe that creation fails, even though the head branch can be fetched successfully from the contributor remote.
Actual behavior
The extension attempts to fetch the fork's head branch from the base repository remote.
Sanitized excerpts from the original logs (branch name replaced with a placeholder):
2026-11-02 17:50:53.859 [info] > git fetch upstream <fork-only-branch> [1896ms]
2026-11-02 17:50:53.859 [info] fatal: couldn't find remote ref <fork-only-branch>
2026-11-02 17:50:54.495 [error] [Worktree] Failed to create worktree: Failed to execute git
The UI only shows the generic Failed to execute git error, so the incorrect remote is visible only in the Git output.
The failed attempt above was made after removing an earlier local workaround and updating VS Code and the extension. The bundled checkoutPRInWorktree implementation in the unmodified 0.174.0 extension still obtains the remote from pullRequestModel.remote.remoteName and fetches prHead.ref from that remote.
Expected behavior
Resolve the remote corresponding to the PR's head repository and fetch the head branch from it, reusing or creating the contributor remote as needed. Use that same remote when selecting the worktree's starting remote-tracking branch.
Workaround / possible fix
Reusing the existing PullRequestGitHelper.createRemote(repository, pullRequestModel.remote, prHead.repositoryCloneUrl) helper before the fetch fixes remote selection locally. Use the returned remote name both for the fetch and for the remote-tracking branch passed to worktree creation.
With this approach, the original UI command was verified to fetch from the contributor remote and successfully create and open a worktree on 0.144.0. I have restored an equivalent local workaround for 0.174.0; the logged failure above is from the unmodified release, not the patched version.
A regression test with a head branch present only on a fork, plus a base remote named upstream, would help cover this topology.
- Dominant language
- TypeScript
- Stars
- 2.6k
- Forks
- 811
- Avg merge
- 1d 9h
- Merged PRs (30d)
- 69
Getting set up
This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from microsoft/vscode-pull-request-github
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
microsoft/vscode-pull-request-github#9159 ·
Maintainers usually reply within 1 day
-
Merging from the PR description tab shows "Error refreshing pull request description: Webview is disposed"Possibly taken @alexr00 claimed this 2 days ago. Open
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
microsoft/vscode-pull-request-github#9143 · 1 reaction · 2 assignees ·
Maintainers usually reply within 1 day
-
Honor open-to-side placement when opening GitHub PR and issue linksPossibly taken @alexr00 claimed this 2 days ago. Openfeature-request
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
microsoft/vscode-pull-request-github#9072 · 1 reaction · 2 assignees ·
Maintainers usually reply within 1 day
-
Resolve Conflicts doesn’t open in VS Code Desktop with a GitHub Remote RepositoryPossibly taken @alexr00 claimed this 1 day ago. Open
microsoft/vscode-pull-request-github#9158 · 1 comment · 1 assignee ·
Maintainers usually reply within 1 day
-
Show loading feedback while Comment and Resolve is resolving a threadPossibly taken @alexr00 claimed this 1 day ago. Open
microsoft/vscode-pull-request-github#9155 · 1 assignee ·
Maintainers usually reply within 1 day
All issues in microsoft/vscode-pull-request-github
Similar issues
-
apps/stage-web bug env/os-linux pending triage scope/audio-output
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
Maintainers usually reply within 1 day
-
reproduced
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
anomalyco/opencode#61640 · 1 comment ·
Maintainers usually reply within 1 day
-
scope: data grid status: waiting for maintainer
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
Maintainers usually reply within 2 days
-
ai-driven-fuzzing bug Minor
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
Maintainers usually reply within 1 day
-
ai-driven-fuzzing bug claude Minor
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
linagora/twake-calendar-frontend#1944 ·
Maintainers usually reply within 1 day