Git problem with interactive rebase

This is basically what happens:

> git rebase -i HEAD~3
Successfully rebased and updated refs/heads/master.

Pops open my text editor then immediately “completes” the rebase before I even have the chance to do anything. Anyone know what might be causing this?

  • git log <filename> doesn't show commit, but git log shows commit that edited the file
  • How can I remove trailing whitespace only on changed lines in a pre-commit git hook?
  • Need help to understand merge conflict example
  • Git force push tag when the tag already exists on remote
  • What are git's merge strategies?
  • Can git be configured to prevent rebase of already published commits?
  • I’m using msysgit on Windows 7: git version

  • Git: Can I commit my working directory to a new branch without committing it to a current branch?
  • Unable to add files with name containing tilde, '~' followed by a number
  • What does git pull . do?
  • Jenkins cannot read Github password since upgrading to Git client plugin 2.1.0
  • Android Studio: Can't start Git
  • How do i switch between different users(github accounts) when pushing repositories?
  • 3 Solutions collect form web for “Git problem with interactive rebase”

    This is probably because Git expects that the text editor will stop and wait until you have finished editing before continuing. Your text editor could start up in such a way that it appears that it immediately finished as far as Git can see.

    You could try setting the EDITOR environment variable to point to a batch file that does something like:

    start /wait my_editor %*

    (but this is just a guess and I’m not in a situation to test it right now).

    Solved, related to the editor variable in git-config:

    How do I use Notepad++ (or other) with msysgit?

    I use Atom – and was getting the same problem.

    git config --global core.editor "atom --wait"

    …fixed it for me straight away.

    More info about setting up different code editors can be found here:

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