tags:

views:

335

answers:

6

I accidentally added a binary file to SVN with the add command, and now I want to remove it from being version controlled, but not delete the file. How do I do this?

+2  A: 

If you didn't commit yet, you can use "svn revert" to undo the add.

CesarB
A: 

The simplest way I know how to do that is to move the file, delete the file using svn, and then move the file back.

Aaron
+1  A: 
  1. Copy the file somewhere.
  2. SVN Delete it.
  3. Copy it back, and SVN ignore it this time.
Jason Kealey
+7  A: 

svn rm --keep-local

superjoe30
I remember reading about this option being considered on the svn mailing list a year or two ago but I didn't know they actually implemented it yet. Looks like it was added in 1.5, good to know, thanks.
Robert Gamble
A: 

Don't you just mean to add it to the ignore list, then just remove the working copy? search for "ignore". In other words, it should remain to be version controlled, but shouldn't pick up any changes in your working copy. (Not entirely sure why you'd want to do this... perhaps there are better ways of achieving what you'd like to do)

Jilles
A: 

As already mentioned svn rm --keep-local is the way to go.

A handy shortcut for those of you using TortoiseSVN: "Delete (keep local)" is available on the TortoiseSVN sub-menu if you hold the Shift button while right-clicking the file you want to delete.

Rydell