What's the best way to remove an accidental merge from GitHub?

I messed up and merged two unrelated projects by mistake. Even though I managed to undo the merge, I still want to get rid of those wrong commits for good. I tried using git rebase, but the merge doesn’t show up there.

Is there a way to completely erase this merge and its commits from my GitHub repo? I want it gone like it never happened. Any tips on how to do this safely?

I’m pretty new to Git and GitHub, so I’m worried about messing things up even more. Should I use the command line or is there an easier way through the GitHub interface? Thanks for any help!

hey, try doing a git reset --hard to the commit just before your merge. it wipes out the merge and later commits. best make a backup first. if command line ain’t your thing, maybe check out github desktop. use caution!