I have tried the rebase, per these instructions (How can I remove a commit on GitHub?), and nothing seems to change.
On computer A, my work system, I had the most recent version of my code. I pushed it to my repo and came home.
Here, with computer B, at home, the last time I'd updated the code was months ago. Apparently I'd made a change or two back in the day (nothing important) and thus had merge conflicts. Used github desktop to do a 'fetch' and it tried to merge; Due to not understanding how merging works, I screwed something up (turns out the merge didn't include lots of needed files)... but didn't know it until it was too late. I then tried to do another github desktop fetch/pull so everything would be sync'd and I wouldn't have this problem again after working from my home system.
I then realized I was missing files and other files were old/screwed up.
On Github, if I look at the commit history... the correct files are one commit back.
All I want to do is blow away my current local repo (which doesn't have any of the current, good, files anyway) and tell github to delete the most recent commit. Then I'll clone and start fresh on the home system.
But I can't for the life of me find a way to delete a commit on github.
EDIT: Given the insistence of @Alex Harvey that the linked instructions working, I went back to the link. Having no luck with the first answer (nothing in the local repo changed) I went with the other option that has 800+ upvotes. I used the command: git push -f origin HEAD^:master
Unfortunately, this deleted about 100 of the most recent commits from my github repo. It looks like it deleted every commit on github since I last sync'd my home computer with the github repo - many months ago.
Help?
EDIT2: To be clear, the system I am has not been used or sync'd to the github repo in months. The only commit locally in the past few months was the 'merge' commit I did that started this whole mess. I suspect that moving back one commit and then forcing a push resulted in the github repo going back in time to how this system looked months ago.
EDIT3: I went to the work system and did a "git push origin master --force" and recovered my work.