How to clean files marked with "!" in 'svn status'?

I added the files to my SVN, but did not make them (so that they appear with the flag "A" in the "svn status"). But then I decided to rename them before committing. I wanted to add them and commit, but "svn status" shows files with old names marked with a "!". and I can’t get rid of it. How should I do it? I even tried "svn delete *" / "svn remove *" in the directory, but executed the "svn status" after it still shows files (which are not on my local hard drive) with the old names marked with a "! .

+5
source share
1 answer

When using wildcards ( *), the delete command deletes all files matching that wildcard, that is, all files in the directory.

But they are not there - you have already deleted them. Therefore, SVN files are not deleted.

You need to explicitly delete these files. If there are many, you can use grepit awkto extract the corresponding files from the status output:

svn st | grep `^!` | awk '{ print $2 }' | xargs svn rm

(untested, use carefully!)

+3
source

All Articles