I ran some times ago some git rebase -i command. But I completely forgot it. Now I want to change new commits order. So I ran git rebase -i HEAD~4, and I get normally
It seems that there is already a rebase-merge directory, and
I wonder if you are in the middle of another rebase.
But I don't even remember what this rebase was all about. How can I find what was the precise purpose of that rebase.
-
To help with the forgetting part, you can include the the git status in your command prompt which will tell you if you're in the middle of an interactive rebase among other things. Here's a link with the basics blog.jasonmeridth.com/2010/05/22/git-ps1.htmlssmith– ssmith2013年10月02日 23:18:22 +00:00Commented Oct 2, 2013 at 23:18
4 Answers 4
It seems like you unexpectedly quit from rebase and for this you get this error in terminal.
To solve this, you need to quit from current rebase and create a new one.
git rebase --quit
Comments
You probably want to read .git/rebase-merge/git-rebase-todo which contains the next rebase --interactive commands that will be run, however, it's much easier to just abort the rebase: git rebase --abort.
Comments
You can go to your_app/.git/rebase-merge and find some related informations.
1 Comment
If it's an old forgotten rebase and you already moved on with things, then you probably don't care anymore (except for learning purposes) and you could just abort the old rebase with
git rebase --abort
2 Comments
git reflog to look for your "lost" commits and then check them out.