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

when I do interactive gitrebase:

git rebase -i HEAD~2

it shows:

  • Can't find cygwin setup.exe file?
  • Cygwin/Git error cygheap base mismatch detected
  • Store https passwords with cygwin's Git
  • Visual Studio Code cannot detect cygwin git.exe path
  • Local Git repository does not exist after sucessfull clone from cygwin bash
  • git error : ssh: Could not resolve hostname?
  • 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.

  • Git merge doesn't merge a file the second time
  • How can I make git-status check two different remotes?
  • What happened to this git commit? Issue with “untracked files”
  • How to fix git error broken link from tree to tree?
  • How to overwrite tags in local git repository?
  • how to abandon commits of certain characteristic when using git?
  • 2 Solutions collect form web for “interactive git rebase failed with “git-rebase-todo: No such file or directory””

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

    You should not be using Cygwin and GnuWin32 together. Delete / Uninstall all traces of GnuWin32 and try again.

    Also I recommend
    setting an editor

    To respond to the comment, you should have no need for GnuWin32. As an example, even a base install of Cygwin contains grep, and a newer version at that.

    Git Baby is a git and github fan, let's start git clone.