It is possible to completely remove a file from my SVN repository?

后端 未结 5 2052
长情又很酷
长情又很酷 2021-01-17 13:16

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 re

相关标签:
5条回答
  • 2021-01-17 13:32

    it is not possible to undo a committed file from svn.

    0 讨论(0)
  • 2021-01-17 13:42

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

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

    0 讨论(0)
  • 2021-01-17 13:43

    We ran into the same problem. My SVN server admin tells me this cannot be done. The only way you can do it is start a new repository and archive the old one to disk or whatever.

    Don't make any changes to the file, esp. if it's a binary file, because then I believe SVN stores multiple copies of it.

    0 讨论(0)
  • 2021-01-17 13:47

    I've looked at doing something similar, and fundamentally Subversion is set up so that you can't simply delete something like that.

    But since you are already backing up the database, you should check this out. What I ended up doing was dumping my repository, filtering it, and then loading it into a new repository. Of course, I was already doing the dump / filter / load cycle for other reasons, so a little bit of extra filtering didn't add much work. If you're already doing a backup, you can backup your current repo (I assume you're doing a dump, or multiple incremental dumps for that), filter that particular revision out using svndumpfilter, and reload from the backup.

    EDIT: Tigris officially has an issue 516 on this. The "svn obliterate" command is planned, but it isn't implemented yet.

    0 讨论(0)
  • 2021-01-17 13:55

    As far as I know, once a file is committed in svn, there is no functionality in svn for undoing that. You can remove the file from the directory and commit the directory, but that will only make the file not being part of the latest revision of the directory; the committed revision is still in there. Usually I find that a good thing, but of course there are cases (like yours) where it may be less desirable.

    0 讨论(0)
提交回复
热议问题