开发者

Cleanup unused old large files in version control

For my current project I'm using Mercurial and hosting it on Bitbucket.

This was the first project I really properly used version control for, so I made a few mistakes starting out. One of these is that I stored all the (uncompressed) sound files that my project uses in the repository with the code.

As a result, right now even though I am no longer storing these files there, pulling for the first time from the server still takes quite a long time (I am guessing that the repository saves all of that so that I can recover back those files if I wanted to?) and the project occupies more space than 开发者_开发知识库it should.

It's not a huge issue, but I'm wondering what would be a good way to fix it now. Also, would this "destructive" editing of the repository affect "compatibility" with other forks (i.e. would create problems pushing changes between forks)?

Thanks! If any more details are needed, please just ask in the comments.

Similar/related to: How to cleanup Mercurial repository?


You can use the convert extension and command to rebuild the repo and remove specific files while doing so. However, as you guessed correctly, this kind of changes do create new changeset hashes and therefore break the "compatibility" with other forks.


Also, would this "destructive" editing of the repository affect "compatibility" with other forks?

Yes, it will. Good thinking on your part! It will be effectively a new repository.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜