让 Mercurial 完全忘记文件和历史记录
我试图让 Mercurial 忘记一个文件以及该文件的所有历史记录。我一直在跟踪一些变化很大的二进制文件,因此我的 .hg/store/data 文件夹现在包含 660MB 的数据,我不想继续推送这些数据。
我考虑过启动一个新的存储库,但这样我就会丢失所有代码更改,所以我放弃了这一点。
I am trying to have Mercurial forget a file, and all the history of that file. I have been tracking some binary files that have been changing a lot, and so my .hg/store/data folder now consists of 660MB of data that I don't want to keep pushing around.
I have considered just starting a new repository, but then I would lose all my code changes, so I have dismissed this.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
你无法直接改变这种历史。请记住,大多数版本控制软件通常都是专门为防止这种情况而设计的。
如果您坚持,您也许可以进行一些挑选来从旧存储库中创建一个新存储库,选择特定的变更集来反映您想要揭示的历史记录。
You can't change that kind of history directly. Remember that most revision control software is usually designed specifically to prevent this.
If you insist, you might be able to do some cherry picking to create a new repository out of the old one, selecting specific changesets to reflect the history you want to reveal.