I have a Git repository and remote access to Github. (Please do not edit the fact that this is on Github. This is relevant and it matters in the answer. Thanks.)
I want to restore the main branch to state 25, completion back.
I do not want to use git --reset hard ...and git push -f, because it is better not to destroy the story.
Is there a way I can tell Git efficiently ...
"Do everything in my working copy exactly the same as the previous one, return it here, including deleting files that did not exist then."
... and then fix this state, and then press it on the remote control?
I tried git revert, but here's what happens ...
$ git revert
error: Commit e88336ec528bc87dd6df3df82280b0fbd8c5a38d is a merge but no -m option was given.
fatal: revert failed
...
$ git revert -m 1
error: Mainline was specified but commit 84ccf1084d17d470ee03b89a7649c4a783f2b914 is not a merge.
fatal: revert failed