I can’t add a directory because Subversion says it’s “already under version control”.

Read Time:38 Second

The directory you’re trying to add already contains a .svn subdirectory, but it’s from a different repository than the directory to which you’re trying to add it. This probably happened because you used your operating system’s “copy” command to copy one working copy into the current one.

The quick and dirty solution is to delete all .svn directories contained in the directory you’re trying to add; this will let the “add” command complete. If you’re using Unix, this command will delete .svn directories under dir:

find <dirname> -type d -name .svn -exec rm -rf {} \;

However, you should ask yourself why you made this copy; and you should ensure that by adding this directory, you won’t be making an unwanted copy of it in your repository.

One thought

Leave a Reply

Your email address will not be published.

This site uses Akismet to reduce spam. Learn how your comment data is processed.