可以从我的 SVN 存储库中完全删除文件吗? [英] It is possible to completely remove a file from my SVN repository?

查看:27
本文介绍了可以从我的 SVN 存储库中完全删除文件吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在将 Tortoise SVN 用于我独自工作的项目,并且我已(错误地)向我的存储库(VC++ Intellisense 数据库)提交了一个巨大的文件.现在我想从我的存储库中删除这个文件以方便备份.

I am using tortoise SVN for a project that I'm working alone and I have committed (by mistake) a huge file to my repository (a VC++ Intellisense Database). Now I want to remove this file from my repository to facilitate its backup.

从我的项目中删除文件并进行提交(显然)并不能解决我的问题,因为该文件的先前版本仍在存储库中.有没有不涉及创建新仓库的方式来解决这个问题?

Removing the file from my project and doing a commit (obviously) do not solve my problem as the previous version of that file are still there in the repository. Is there a way to solve this problem that does not involve the creation of a new repository?

编辑

@ryansstack 解决方案运行良好,这就是我所做的(我在存储库所在的目录中运行命令):

The @ryansstack solution worked perfectly, that is what I did (I ran the commands in the directory where my repository was located):

首先,我创建了我的存储库的转储,过滤了那个巨大的文件:

First I created a dump of my repository filtering that huge file:

svnadmin dump tcc | svndumpfilter exclude "/trunk/Image Segmentation/Image Segmentation.ncb"  > tcc.bak

然后我创建了一个新的存储库 (tcc2) 并运行以下命令:

Then I have created a new repository (tcc2) and ran the following command:

svnadmin load tcc2 < tcc.bak

现在 tcc2 的转储大小为 7 MB,而 tcc 为 170 MB.

Now the dump size of tcc2 is 7 MB versus 170 MB of tcc.

推荐答案

http://subversion.apache.org/faq.html#removal

你不能,很快,但有办法

you can't, quickly, but there is a way

这篇关于可以从我的 SVN 存储库中完全删除文件吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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