vscode-gitlens icon indicating copy to clipboard operation
vscode-gitlens copied to clipboard

Interactive rebase editor not opening git-rebase-todo properly

Open dbersan opened this issue 1 year ago • 8 comments

Description

Following the discussion here, which was closed for some reason.

Cannot use the interactive rebase editor with git rebase <branch name>, even though I have the option enabled:

image

The "top comment" says to edit .gitconfig with :

[core]
    -- editor = code -n -w

IT DID NOT WORK.

I also tried this:

git config --global sequence.editor "code --wait --reuse-window"

It seems to work at first (opens the visual rebase on vscode), but the rebase fails with the message:

image

GitLens Version

15.0

VS Code Version

No response

Git Version

No response

Logs, Screenshots, Screen Captures, etc

No response

dbersan avatar Jun 03 '24 15:06 dbersan

This is what I have in my .gitconfig and the interactive rebase works for me

[core]
	editor = code --wait

GitLense Version: 15.1.0 VS Code Version: 1.90.2

nistre avatar Jun 24 '24 12:06 nistre

Hi,

I am facing the exact same using GitLens v15.1.0 inside codium.

[core]
	editor = codium --wait

image image image

If I deactivate the plugin or the Interactive rebase editor

image

then the file opens correctly as pure text

image

McFoggy avatar Jun 27 '24 10:06 McFoggy

I just had a coworker install Gitlens for the first time in VS Code for him to use the Interactive Rebase feature but ran into the same issue, even with my .gitconfig core.editor that works for me. I wonder if there is an issue is with the initial setup of Gitlens that doesn't configure like it used to or that the Interactive Rebase changed but the initial setup wasn't updated.

nistre avatar Jul 02 '24 11:07 nistre

I wonder if there are similarities between this and #1172

nistre avatar Oct 08 '24 20:10 nistre

I just today run into the same issue. Trying to perform an interactive merge and would get me the message: The editor could not be opened because the file was not found.

I closed all my VSCode sessions and killed all remaining processes that were connected to vscode in someway. (mainly extensions). Then I restarted VSCode. After this, the issue was resolved and I could use the interactive merge view of GitLens again.

t-aras avatar Oct 22 '24 08:10 t-aras

I just today run into the same issue. Trying to perform an interactive merge and would get me the message: The editor could not be opened because the file was not found.

I closed all my VSCode sessions and killed all remaining processes that were connected to vscode in someway. (mainly extensions). Then I restarted VSCode. After this, the issue was resolved and I could use the interactive merge view of GitLens again.

I had to do the same, but I also needed to kill all the node processes.

fcFn avatar Dec 01 '24 15:12 fcFn

The editor would also not pop up for me automatically, but I was able to click on a banner in the gitlens side panel to open it by hand, even when I invoke the rebase by a different tool or from the cli.

Image

ackvf avatar Jun 24 '25 11:06 ackvf

I'm getting the same issue as well. Currently using the new VSCode git worktrees, I get the same error and the logs show

Error: Unable to read file

'<PATH_TO_ORIGINAL_REPO>\.git\worktrees\<worktree_name>\rebase-merge\git-rebase-todo' (Error: Unable to resolve nonexistent file '<PATH_TO_ORIGINAL_REPO>\.git\worktrees\<worktree_name>\rebase-merge\git-rebase-todo')

This occurs if I only have a VSCode window opening the worktree folder. If i have a window opening the original repository as well as a window for the worktree folder, the rebase editor shows up in the window for the original repository's folder.

KKhanhH avatar Oct 02 '25 23:10 KKhanhH