Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

fatal: Could not open file .git/rebase-merge/done for reading: No such file or directory

Tags:

git

github

I was going to do a rebase to delete my last commit but I didn't want to finish so I exited. (I realize this probably was not the best way to go about it, but it's done) I guess I did it wrong because I am getting the error: fatal: Could not open file .git/rebase-merge/done for reading: No such file or directory every time I run git status. How do I get rid of this error so I can continue making commits? Can I just delete the file? If I can delete it, how would I do that?

like image 753
Andrea Avatar asked Aug 05 '16 16:08

Andrea


People also ask

How do I stop git rebase?

You can run git rebase --abort to completely undo the rebase. Git will return you to your branch's state as it was before git rebase was called. You can run git rebase --skip to completely skip the commit.

What does git rebase mean?

What is git rebase? Rebasing is the process of moving or combining a sequence of commits to a new base commit. Rebasing is most useful and easily visualized in the context of a feature branching workflow.

How do I rebase a commit?

To use git rebase in the console with a list of commits you can choose, edit or drop in the rebase: Enter git rebase -i HEAD~5 with the last number being any number of commits from the most recent backwards you want to review. In vim, press esc , then i to start editing the test.

How do I change a merge commit message?

On the command line, navigate to the repository that contains the commit you want to amend. Use the git rebase -i HEAD~n command to display a list of the last n commits in your default text editor. Replace pick with reword before each commit message you want to change.


1 Answers

Before you try the following, make sure you stash or commit any uncommitted changes first, or you will lose them irrevocably.

Then try to do a git rebase --abort.

like image 75
DavidN Avatar answered Sep 20 '22 23:09

DavidN