清理Mercurial存储库 [英] cleaning out a Mercurial Repository

查看:51
本文介绍了清理Mercurial存储库的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的汞回购历史记录中有一堆文件已被删除.它们使存储库变得很大(其中有许多是图像,以及项目早期的sql转储,以及其他本来就不应提交的内容).

There are a bunch of file in the history of my hg repo that have been removed. They are causing the repo to get pretty big (several of them are images, and sql dumps from early in the project, among other things that never should have been comitted in the first place).

如何使人们忘记这些东西并重新将存储库缩小到合理的大小?

How do I get mercurial to forget about that stuff and get my repository down to a reasonable size again?

我应该只复制文件(和.hgignore)并创建新的回购,同时将旧文件存档以备将来参考吗?

Should I just make a copy of the files (and the .hgignore) and make a new repo, while archiving the old one for future reference?

推荐答案

请参阅:

$ hg convert --help

...

$ hg convert --filemap fmap old new

文件fmap包含以下内容:

where file fmap contains something like:

exclude path/to/file/to/purge

(源代码: https://www.mercurial- scm.org/pipermail/mercurial/2008-August/020721.html )

这篇关于清理Mercurial存储库的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆