【问题标题】:Github history accessible by link even after deletion [duplicate]即使在删除后也可以通过链接访问 Github 历史记录 [重复]
【发布时间】:2021-09-08 21:19:21
【问题描述】:

我已通过以下两种方法删除了我的 repo 的整个提交历史记录:

  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/

虽然历史记录在任何地方的回购页面上都不可见,但当我尝试使用旧提交链接(即https://github.com/username/repo/blob/number/filename)访问时,我能够看到更改。唯一的情况是,当我更改存储库的可见性时,它给出 404。如何防止公共存储库访问所有旧更改?

【问题讨论】:

标签: git github commit history


【解决方案1】:

据我了解,github 以不可预测的时间间隔运行 git gc (garbage-collect)。您的提交目前仍然可用,但是一旦所有这些悬空提交都被垃圾收集,直接链接也将不再有效。

您可以ask them directly(参见此处的第 8 点)触发垃圾回收。

【讨论】:

    猜你喜欢
    • 2014-12-13
    • 2011-04-02
    • 2023-03-27
    • 1970-01-01
    • 2023-01-22
    • 1970-01-01
    • 1970-01-01
    • 2011-02-10
    • 1970-01-01
    相关资源
    最近更新 更多