guozhu cheng
guozhu cheng

Reputation: 151

interactive git rebase failed with "git-rebase-todo: No such file or directory"

when I do interactive git-rebase:

git rebase -i HEAD~2

it shows:

C:\GnuWin32\bin\grep.exe: /cygdrive/xxx/.git/rebase-merge/git-rebase-todo: No such file or directory Nothing to do

(xxx is the project path)

but git rebase branch_xxx is working.

I am sure no rebase is in progress previous(checking with git rebase --abort and use clean project folder both)

have some one solved this ? I google it but wihtout useful tips.

Upvotes: 13

Views: 5920

Answers (2)

felix-ht
felix-ht

Reputation: 2085

For VS Code this means that git did not to pass the wait flag.

wrong:

[core]
    editor = code

correct:

[core]
    editor = code --wait

Upvotes: 3

skeller88
skeller88

Reputation: 4514

My problem was due to my gitconfig missing the -w and -n flags:

[core]
    editor = sublime -w -n

From Code Project:

[The -w and -n arguments are] passed to Sublime Text, and essentially tell it to run without loading any previously open windows (the –n flag), and to wait until the user exits to pass execution back to the calling process (the –w flag, for "wait")

Upvotes: 17

Related Questions