Microsoft/vscode

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

Open

#264.209 aperta il 31 ago 2025

Vedi su GitHub
 (1 commento) (13 reazioni) (1 assegnatario)TypeScript (10.221 fork)batch import
buggithelp wanted

Metriche repository

Star
 (74.848 star)
Metriche merge PR
 (Merge medio 11h 43m) (1000 PR mergiate in 30 g)

Descrizione

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.

Guida contributor