C. Ross
C. Ross

Reputation: 31848

How can I remove a file from my svn working copy without deleting it?

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?

Upvotes: 2

Views: 138

Answers (3)

João Quintas
João Quintas

Reputation: 851

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 be 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?

Upvotes: 0

Cat Plus Plus
Cat Plus Plus

Reputation: 129754

If it's in A state, then simple svn revert is what you need.

Upvotes: 3

Tamas Czinege
Tamas Czinege

Reputation: 121294

svn revert filename

Upvotes: 7

Related Questions