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?

  • issue with rhc setup and openshift
  • Git hook for any action that updates the working directory
  • GIT: Do I need to commit my branch before checking out another branch, what about stashing?
  • How can I choose to overwrite remote repository with local commits?
  • Two people working on a file at the same time in git
  • How can I see how much I have remaining of a rebase?
  • I’m using msysgit on Windows 7: git version

  • Pushing a repository onto GitHub
  • git commit directory
  • In short, what are the advantages of git and mercurial over subversion?
  • git branch without history
  • How do I use vim as 'git log' editor?
  • Collaborating Android Studio projects on multiple machines
  • 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.