Microsoft/vscode

[Bug] Git Worktree menu does not appear in command palette with git.detectWorktrees enabled over SSH

開放

#264,209 建立於 2025年8月31日

 (1 則留言) (14 個反應) (1 位負責人)TypeScript (39,847 個分叉)batch import
CyclingDrapeDuplicateGood first issueUXbuggithelp wanted

倉庫指標

星標
 (184,936 顆星)
PR 合併指標
 (PR 指標待抓取)

描述

Does this issue occur when all extensions are disabled?: Yes

  • VS Code Version: 1.103.2 (Universal)
  • OS Version: macOS 15.6.1 (24G90) and Ubuntu 22.04.5 LTS (remote)

Steps to Reproduce:

  1. Connect to a remote Ubuntu 22.04.5 LTS machine (e.g., AWS EC2) from a macOS client via the Remote - SSH extension.
  2. In the remote terminal, create a Git repository and a worktree using the command: git worktree add ../new-worktree main
  3. Open the new-worktree directory in VS Code.
  4. Set "git.detectWorktrees": true in your settings.
  5. Reload the VS Code window.
  6. Open the command palette (Cmd+Shift+P) and type worktree.

Expected Behavior

The command palette should display Git Worktree-related commands, such as Git: Worktree, allowing for easy management of the worktree from the VS Code UI.

Actual Behavior

No worktree-related commands appear in the command palette.

Additional Context

  • The issue persists even after performing a clean reinstallation of both VS Code and Git.
  • The Git version on the remote machine is 2.34.1, which meets the requirement for the feature.
  • Running git worktree list on the remote terminal correctly lists the worktree.
  • The VS Code developer console shows no errors related to git or worktree.
  • The issue persists even after setting git.showOutput to always and inspecting the output logs. No relevant commands or errors were observed.
  • Manually created worktrees are correctly referenced in the Source Control view (e.g., the branch name is displayed), but the specific worktree commands are absent.
  • This problem seems to be specific to the remote SSH connection environment, as it doesn't occur with local repositories.

貢獻者指南