11

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.

guozhu cheng
  • 131
  • 1
  • 8
  • Is the full path of git-rebase-todo shorter than 250 characters ? – StKiller Jun 17 '13 at 04:49
  • @Andrei Podoprîgora yes, it's shorter than 250 characters. the interactive git rebase work correctly before. I don't known whether I have changed some environment variable that can effect this. for there are some days that I havn't exec this command. – guozhu cheng Jun 17 '13 at 05:42
  • in this case it's another issue. Maybe you will find an answer there : http://stackoverflow.com/questions/3685001/git-how-to-fix-corrupted-interactive-rebase – StKiller Jun 17 '13 at 05:52
  • thanks, I try it but seems not the same as my problem, I think I need a re-install of my cygwin and git. – guozhu cheng Jun 17 '13 at 10:47

2 Answers2

17

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")

skeller88
  • 4,276
  • 1
  • 32
  • 34
  • 2
    Whoever downvoted, tell me why please. I could see downvoting, maybe, because this is could be a mac-only solution. But the error I was experiencing that led me to this post is the same error message. And my solution fixes my issue. – skeller88 Nov 20 '15 at 05:16
1

For vs code it means that forgot to pass the wait flag to code.

wrong:

    editor = code

correct:

    editor = code --wait
felix-ht
  • 1,697
  • 15
  • 16