0

I have deleted the entire commit history of my repo by both of the following methods:

  1. how to delete all commit history in github?
  2. https://www.willandskill.se/en/deleting-your-git-commit-history-without-removing-repo-on-github-bitbucket/

Although the history is not visible on the repo page anywhere, when I try and access using an old commit link i.e. https://github.com/username/repo/blob/number/filename I am able to see the changes. The only scenario is when I change visibility of the repo when it gives 404. How do I prevent all old changes from being accessible for a public repo?

Leena
  • 523
  • 1
  • 10
  • 19

1 Answers1

2

As I understand it, github runs git gc (garbage-collect) at unpredictable intervals. Your commits are still available for now, but once all these dangling commits have been garbage-collected, direct links will also no longer work.

You can ask them directly to trigger garbage collection.

Daan Reid
  • 341
  • 4
  • 7
  • This is the direct link to section mentioned. Looks like it's not numbered anymore https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/removing-sensitive-data-from-a-repository#fully-removing-the-data-from-github – Jack B Jan 18 '22 at 17:24
  • Thanks, updated my answer – Daan Reid Jan 20 '22 at 14:51