从 Mercurial 存储库中擦除敏感文件
是否可以从 Mercurial 存储库中完全删除文件及其所有痕迹?提交了一个包含一些敏感信息的文件,想知道是否可以从存储库中擦除它的所有痕迹。
Is it possible to completely remove a file and all traces of it from a mercurial repository? There was a commit of a file with some sensitive information and would like to know if it's possible to wipe all traces of it from the repository.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您可以通过转换扩展名、使用 --filemap 选项并排除该文件。
但我认为(当您弄乱变更集 ID 之间的关系并更改变更集 DAG(有向无环图)时,您最终会得到一个新存储库,该存储库无法与旧存储库进行推/拉。希望这对您来说不是问题。
运行对它进行一些测试:D
You can, by using the convert extension, using the --filemap option and exclude the file.
But I think (as you mess with the relations between the changeset IDs and change the changeset DAG (Directed Acyclic Graph) you end up with a new repository which cannot push/pull with the old one. Hope that's not a problem for you.
Run some tests on it :D