I amended a commit a few times and did push --force
each time (stupid mistake; I didn't realize until getting ready to send a PR that my editor had generated tons of noise by fixing tabs and trailing whitespace). The commits that I thought were no longer existent are still reachable on GitHub, and the issue reference causes a list of links to these non-existent commits to appear:
How do I get rid of these commits on the GitHub remote so that these extra links will go away?