PSA: You can view deleted commits on a GitHub repository, even if you force-push the whole repository. ⚠️
This is my commit history for my website: https://github.com/grikomsn/personal-websites/commits/main
This commit history does not exist on my repository: https://github.com/grikomsn/personal-websites/commits/106baefac869ba1049b3100a1cab6313efaaa5cd
I have force-pushed my repo many times, assuming that previous histories are deleted. Here are different commit histories which should not exist:
Theoretically, if someone tracks all commit hashes for a repo on @GitHub, they can view the repo's past, present, and future history, regardless if it has been replaced or deleted. This is basically a git multiverse. ✨
One solution I can find to remove all references is from their docs page: "Contact GitHub Support, asking them to remove cached views and references to the sensitive data in pull requests on GitHub"
I have asked GitHub support (ticket 1466521) if it's possible to clear these dangling references. Sadly there's no way to remove those unless all forks are removed, which it will never happen anytime soon.
I guess there's a reason why we don't mess with the multiverse.
This was originally posted as a Twitter thread and also published on Typefully: https://typefully.com/griko_nibras/git-multiverse-view-deleted-git-histories-on-z5vyIEuxH166