I accidentally added a file to my svn working copy that I don't want to check in (a test image). I haven't commited yet, so how do I remove the file from my svn working copy without deleting it?
Asked
Active
Viewed 128 times
3 Answers
7
svn revert filename

Tamas Czinege
- 118,853
- 40
- 150
- 176
-
Awesome, just what I needed! This is why I LOVE StackO! – C. Ross Jan 24 '10 at 21:32
0
In case it happens to a folder you can use the same command adding the desired level to apply recursivity
svn revert --depth infinity [folder_name]
It may useful to add the folder to the ignore list in case you are interested in maintaining it under the same folder structure without worrying about an accidental add/commit. A helpful post about this aspect can be found here How do I ignore a directory with SVN?

João Quintas
- 761
- 2
- 9
- 18