FlyingCat
FlyingCat

Reputation: 14250

Best practice to copy files to a new folder in SVN

I am trying to copy bunch of folders to a new folder and want to commit the files in the new folder.

the new folder is called test but when I tried to svn add test/, it gave me 'test' is already under version control error. I need to commit the new test folder and need the files under that folder in version. What is the best practice to do this?

Upvotes: 0

Views: 99

Answers (1)

David W.
David W.

Reputation: 107040

Don't copy and then use svn add. This will create a completely separate set of files and the files will have no relationship with each other. Instead, use svn copy (aka svn cp). This way, you can merge changes that take place on the original set to your test set.

Also, make it a complete branch while you're at it. Branching in Subversion is light and quick. Branch the whole project as your test area. Don't just do a few directories. This way, you can treat it like an entire project.

Finally, make sure you're directory doesn't already exist. This is what your error message is telling you.

Upvotes: 4

Related Questions