I did not realize that git does not understand file renames (by design(!)) and moved some files around. Then I put them back. Now git log seems to work, but git log --follow does not. And Eclipse seems to use the latter. (git log --follow could not follow my renames.)
So what I want to do is somehow get HEAD back to where it was before I started. Throw away everything and then move forward as if it had never happened. (I have made some other changes since, I'll just make them again manually, no problem.)
git revert is not the answer. It will just push additional commits on top which will totally confuse the histories. I need the changes gone, or at least taken right out of the main line.
So I have done
git branch moveDead
git reset --hard 4902b024588678cd493929955f79c6405f6dab9d
git branch beforeMoves
All good. (branches just for future reference.)
But I cannot now push, as I had pushed the renamed files, not realizing the danger at the time. I need to reset the remote.
I am the main developer on this repository, so maybe we could restore the main git repository from a backup and then move it forward, but that would be awful.
(There are no branches or other complicating factors.)