Using Eclipse 2022-12 and egit 6.4.0.202211300538-r .
Every once in a while I get a branch in an Eclipse git repository into a state where it appears my only recourse is to delete the entire repository and reclone it to my desktop. This is usually fine if I don't need anything in any of the other branches. Right now, I'm tired of having to do this, so I'm going to pursue this.
I did not initiate a merge, but it thinks I am somehow in the middle of a merge, and either doing a hard reset or doing a "git merge --abort" from the command line doesn't work.
When I do the hard reset and then do a pull, it still thinks there are conflicts. If I select all the files that it think I changed and do "Replace with HEAD", it removes from the staging area, but the git pull still fails and thinks there are conflicts.
I tried "git merge --abort" from the command line, and it says "fatal: There is no merge to abort (MERGE_HEAD missing).".
After I do the hard reset, the repository in the repositories list shows both an uparrow and a downarrow, with "1" next to both of them. I assume that the uparrow indicates there are local changes not pushed, which is odd because I just did the hard reset.
How do I get out of this?
Update:
Answering some questions from comments:
When I run "git status", it says (entirely consistent with what egit tells me):
On branch branchname
Your branch and 'origin/branchname' have diverged,
and have 1 and 1 different commits each, respectively.
(use "git pull" to merge the remote branch into yours)
Untracked files:
...
nothing added to commit but untracked files present (use "git add" to track)
I changed the branch name and elided the untracked files.
Also, my pulls are set for merge, not rebase.