You can create a branch from commit to problem, and a branch on the first commit after problem. Then rearrange the second to the first. Then, if you reset your wizard, point to the new tip of this branch and delete all links to another line, GC will eventually destroy the elements.
Of course, you probably want to re-clone the entire repo after this, since it is such an invasive change that involves updating a large number of links (assuming that there was a lot of things that happened on the repo from your description, as it is).
source share