I'm interesting in reducing the size of .hg folder in my p开发者_运维知识库roject. I have size of .hg folder near 180Mb, but the real sources size of project is near 6Mb. So, I need some ways to downscale size of .hg folder.
In Mercurial history, there are a lot of bin, image files. I searched some ways to solve this problem, but this is not exactly what I need. I needn't remove specific file, I need to remove all commits, so, in example: 0....1360 commits. With in more than 150Mb, and 6Mb real sources. I need similar to use 0...(1~50) commits and near 10Mb of real sources. This is cloned repositary, but I want to save all history in my server. So, the cloned repo with 10 commits need's to be related with server repo with 1360 commits. Any ways?It sounds like you have both source code and your binaries committed to the repository. One option is to create a second repository for only "published/compiled" code and remove anything compiled from the first repository. Use the new repository for deploying updated code to your server. This should come with a smaller .hg folder on the server.
Either way, you cannot "remove" history without actually losing it with a DVCS. You have the option of completely deleting the .hg folder, but if you want to use Mercurial to update that folder and keep things in sync with what the latest changes are in the repository, you'll need to keep that folder around.
精彩评论