Cannot soft reset git repository in the middle of a merge, but there is no merge to abort

Viewed 10865

When running the command git reset --soft HEAD^ in my repository, the terminal tells me it is in the middle of a merge:

fatal: Cannot do a soft reset in the middle of a merge.

But when trying to abort the merge with git merge --abort, the terminal states that there is no merge:

fatal: There is no merge to abort (MERGE_HEAD missing).

Is there a "hidden" merge in git of some sort? I don't know much about how git works and am not sure how to fix this. If I run git reset --hard HEAD will the changes I made to the files still be saved and I just have to restage and commit them?

2 Answers

Partial answer: you'll lose all the changes you made while running git reset --hard

You might have merge conflicts. If you resolve your conflicts, the run git rebase --continue, then the soft reset option should be available.

Related