Reputation: 1731
I have a few unversioned directories in my local copy on my Linux. The svn status doesn't list the unversioned directories. The command svn status| grep ^?
only lists unversioned files in versioned directories. What's the command to list unversioned directories and the files in it?
Upvotes: 0
Views: 594
Reputation: 5298
svn add
command will add unversioned files and folders and list them as well. We do want to list them, but we do not want to add them. So, we can run svn rm --keep-local
after that to revert adding (and avoid discarding local modifications).
Run:
svn add * --force
which will list all unversioned objects in your working copy (including those with svn:ignore
property). But, this will also mark for adding all these objects.
Why do you need --force
option is described in SVN book:
Normally, the command svn add * will skip over any directories that are already under version control. Sometimes, however, you may want to add every unversioned object in your working copy, including those hiding deeper. Passing the --force option makes svn add recurse into versioned directories
Then, just revert those addings and keep local modifications (note the trailing dot):
svn rm --keep-local .
Why do you need --keep-local
option is described in SVN book:
Use the --keep-local option to override the default svn delete behavior of also removing the target file that was scheduled for versioned deletion. This is helpful when you realize that you've accidentally committed the addition of a file that you need to keep around in your working copy, but which shouldn't have been added to version control.
This obviously has side effect of removing all addings, including those that are intentional.
After this, you should have a list of unversioned files and folders, with untouched local copy.
Upvotes: 1