Adding new projects into my svn repository has always been a hit or miss operation for me: Sometimes, files get imported into parent folder, sometimes, I end up with additional folder depth. Here’s a method I found somewhere on the net that works every time:
Import in Place
Assuming you already have a repository, and you want to add a new folder structure to it, just follow these steps:
- Use the repository browser to create a new project folder directly in the repository.
- Checkout the new folder over the top of the folder you want to import. You will get a warning that the local folder is not empty. Now you have a versioned top level folder with unversioned content.
- Use TortoiseSVN → Add… on this versioned folder to add some or all of the content. You can add and remove files, set svn:ignore properties on folders and make any other changes you need to.
- Commit the top level folder, and you have a new versioned tree, and a local working copy, created from your existing folder.