git - 从 github 中完全删除旧的提交(不仅仅是从历史中)

标签 git github

我想完全删除我对 GitHub 的提交 我按照 here 中的说明使用了 git-filter-branch现在分支的历史被不同的提交所取代,旧的提交无法通过搜索历史发现

但是 - 我必须指向旧提交的链接仍然有效,并且仍然引导我到我想在 Github 上删除的数据

有没有办法从 GitHub 中删除此提交和/或使对它的所有访问无效?

最佳答案

关键在this段落:

It's important to note that those commits may still be accessible in any clones or forks of your repository, directly via their SHA-1 hashes in cached views on GitHub, and through any pull requests that reference them. You can't do anything about existing clones or forks of your repository, but you can permanently remove cached views and references to the sensitive data in pull requests on GitHub by contacting GitHub Support or GitHub Premium Support.

一般而言,关于 Git 的一个关键点是,即使您正在使用类似 filter-branch 的东西,提交也不会真正删除。相反,会创建具有相同更改但过滤掉敏感数据的新提交。 Git 中的几乎所有操作都是这种情况—— rebase 、cherry-pick 等。提交不会被销毁,只会创建新的。所以这里最好的办法是联系 GitHub 支持,看看他们是否可以帮助您从 repo 中清除该提交,因为没有对它的引用(例如分支)。

关于git - 从 github 中完全删除旧的提交(不仅仅是从历史中),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/57604738/

相关文章:

ruby-on-rails - 无法运行上限生产部署:使用 Net::SSH::AuthenticationFailed 初始化:用户身份验证失败?

Git 克隆错误 : RPC failed - curl 28 Operation too slow

Git - 如果我想拥有一致的工作流程,那么 cherry-pick 是一种不好的做法吗?

再次打印相同字符串时,Ruby 返回 null

git - 没有未 merge 提交的新 pull 请求

github 远程标签推送无需克隆 repo

python - 如何(自动)配置存储库/项目脚手架 Azure DevOps/GitHub?

git - 从 git repo 恢复文件而不提交

git - 是否可以为不同的项目使用不同的 Git 配置?

windows - 将 "git describe --abbrev=0"结果获取到变量中