Skip to content

Interactive Rebase opens in the wrong VS Code instance when using worktrees #4160

@jnjaeschke

Description

@jnjaeschke

Description

First off, I want to mention that so far this only happened once, but I have recently started using Git Worktrees again, and I think this is the first time that I have used interactive rebase since. But, maybe this is an intermittent issue... I'll monitor the situation and give an update if I encounter different results.

I have several VS Code instances open. Among those there is my repo checkout (checked out at the main branch), and a git worktree of the repo (checked out at a different branch). When trying to do an interactive rebase in the VSCode window of the git worktree (GitLens Commits panel -> Right Click on a commit-> Rebase current branch onto Commit -> Interactive Rebase), the git-rebase-todo tab opens in the VSCode instance where my main branch is checked out, not the one where I started the interactive rebase (It also pulls this window into focus). I can do the rebase there just fine, but it is confusing and presumably unexpected that the interactive rebase view opens in a different window.

GitLens Version

16.3.3

VS Code Version

Version: 1.98.2
Commit: ddc367ed5c8936efe395cffeec279b04ffd7db78
Date: 2025-03-12T13:32:45.399Z
Electron: 34.2.0
ElectronBuildId: 11161602
Chromium: 132.0.6834.196
Node.js: 20.18.2
V8: 13.2.152.36-electron.0
OS: Linux x64 6.11.0-19-generic

Git Version

git version 2.45.2

Logs, Screenshots, Screen Captures, etc

No response

Metadata

Metadata

Assignees

Labels

area-rebase-editorIssues or features related to the Interactive Rebase Editorpending-releaseResolved but not yet released to the stable editionverified ✔Verified

Type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions