21

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.

asked Oct 2, 2013 at 10:27
1
  • 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.html Commented Oct 2, 2013 at 23:18

4 Answers 4

16

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
answered Oct 4, 2021 at 10:13
Sign up to request clarification or add additional context in comments.

Comments

5

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.

answered Oct 2, 2013 at 17:44

Comments

4

You can go to your_app/.git/rebase-merge and find some related informations.

answered Oct 2, 2013 at 10:29

1 Comment

Where do I find the file with the commits that I edit?
3

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
answered Oct 2, 2013 at 10:37

2 Comments

that's what I did but I lost all the commits I made in that branch, please help !
You never lose commits until they are gc'ed which by default would only happen after 30 days. Just youse git reflog to look for your "lost" commits and then check them out.

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.