views:

226

answers:

4

I have an SVN repository. Over time, as I edit, modify, change, etc, some files are made redundant/unwanted.

What's the best practice: to delete the files from SVN, or just to zero the files out? Or is there a third option that I'm missing?

Thanks.

+11  A: 

If you delete unneeded files from Subversion, they are still available in the history. They don't disappear forever. So I would "svn rm" them.

Greg Hewgill
+4  A: 

Delete the file(s):

svn remove <file>

The files will not be permanently removed from the repository, just removed from the HEAD revision.

JesperE
+1  A: 

Committing an empty file would still leave the file to annoy you, just minus any content. svn rm is the way to go.

Andy Lester
A: 

As subversion comes out with new releases you may want to do a full repository export(instead of a backup or hotcopy). Install the new release and then do a full repository import.

This will start your revision numbers over and you will loose all history before that export.

J.J.
@eyelidlessness: can you be more specific as to what your huhing.
J.J.
This doesn't seem to have anything to do with the question.
KeithB
@KeithB: I am offering the 3rd option. It has everything to do with his question. To permanently delete his files. he can do an export and create a new repository, then import what he exported. I prefer to do this between point releases. There are draw backs, which I also note.
J.J.
This means you're throwing away all other history with it. I would recommend against this in 99.9% of all use-cases
Sander Rijken
Yes Sander is right you are throwing away ALL of the history. You can keep backups in case of emergencies, but this is a nightmare to keep up with.
J.J.