Hacker News new | ask | show | jobs
by dastx 2045 days ago
My experience has been that Github doesn't ever purge commits from the history. Even when you rewrite the history, all the dangling commits are still there and can be access. I've yet to find a way to force Github to do a gc so such commits are removed. Without Github running a GC on the repo, the commits will not be removed.
1 comments

You can contact their support to do it for you, for example in the case of pushed secrets.
Pushed secrets in public repos are automatically archived by third parties so removing commits containing them would not be enough to prevent their use, just rotating the secrets is the way to go here.

https://twitter.com/andrzejdyjak/status/1324360905237372929 https://news.ycombinator.com/item?id=25013756

That shouldn't be necessary. Something as fundamental should be made available as some sort of API.