Git Multiverse: View Deleted Git Histories on GitHub
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:
106baefac869ba1049b3100a1cab6313efaaa5cd
e4c856f44bb90b88f7ba8de16643dd0db0477a46
1c43f7819656ac8a73259cc163b627af7dc1816f
8bd406afadb20fec9bba8d8cdb8cafd1b65c30f2
5b85058dea5ce4b8d73d6d3c95460e74dd6c039b
d2f2d849931f5965c75b4f47571387a2b84900f2
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