Skip to content

Fix worktree checkout for pull requests from forks - #8987

Draft
Alex Ross (alexr00) with Copilot wants to merge 4 commits into
mainfrom
copilot/fix-checkout-pr-in-worktree
Draft

Alex Ross (alexr00) with Copilot wants to merge 4 commits into
mainfrom
copilot/fix-checkout-pr-in-worktree

Conversation

Copilot AI commented Sep 29, 2026 •

Copy link
Copy Markdown
Contributor

Worktree checkout fetched fork PR branches from the base repository’s remote, where they do not exist. The resulting notification hid Git’s underlying error.

  • Remote resolution: Reuse the existing fork-remote helper to find or create the correct remote, preserving SSH/HTTPS selection.
  • Branch safety: Use unique PR branch names for forks to avoid selecting unrelated local branches such as main. Preserve same-repository checkout behavior.
  • Diagnostics: Surface Git stderr in notifications and logs, falling back to the existing error message when unavailable.

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
There may be pipelines that require an authorized user to comment /azp run to run.

Copilot AI and others added 3 commits September 29, 2026 09:59
Co-authored-by: alexr00 <38270282+alexr00@users.noreply.github.com>
Co-authored-by: alexr00 <38270282+alexr00@users.noreply.github.com>
Co-authored-by: alexr00 <38270282+alexr00@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix checkout pull request in worktree for forks Fix worktree checkout for pull requests from forks Sep 29, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Checkout Pull Request in Worktree fails for PRs from forks ("Failed to execute git")

2 participants