Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to remove an accidentally put large file (4GB) from Subversion repository?

Well this file was put in the repo by mistake and was deleted and added to ignore list. However, because it once existed, my repo is now > 4GB in size and some SVN functions take years to complete. I would appreciate any help and tips. (I'm on XP if it matters)

like image 891
Wartin Avatar asked Dec 22 '22 08:12

Wartin


2 Answers

How do I completely remove a file from the repository's history?
There are special cases where you might want to destroy all evidence of a file or commit. (Perhaps somebody accidentally committed a confidential document.) This isn't so easy, because Subversion is deliberately designed to never lose information. Revisions are immutable trees which build upon one another. Removing a revision from history would cause a domino effect, creating chaos in all subsequent revisions and possibly invalidating all working copies.

The project has plans, however, to someday implement an svnadmin obliterate command which would accomplish the task of permanently deleting information. (See issue 516.)

In the meantime, your only recourse is to svnadmin dump your repository, then pipe the dumpfile through svndumpfilter (excluding the bad path) into an svnadmin load command. See chapter 5 of the Subversion book for details about this.

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

like image 103
Robert Harvey Avatar answered Feb 22 '23 23:02

Robert Harvey


From the FAQ

How do I completely remove a file from the repository's history?

There are special cases where you might want to destroy all evidence of a file or commit. (Perhaps somebody accidentally committed a confidential document.) This isn't so easy, because Subversion is deliberately designed to never lose information. Revisions are immutable trees which build upon one another. Removing a revision from history would cause a domino effect, creating chaos in all subsequent revisions and possibly invalidating all working copies.

The project has plans, however, to someday implement an svnadmin obliterate command which would accomplish the task of permanently deleting information. (See issue 516.)

In the meantime, your only recourse is to svnadmin dump your repository, then pipe the dumpfile through svndumpfilter (excluding the bad path) into an svnadmin load command. See chapter 5 of the Subversion book for details about this.

like image 21
Marc Gravell Avatar answered Feb 22 '23 23:02

Marc Gravell