Import data into SVN repository

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:

  1. Use the repository browser to create a new project folder directly in the repository.
  2. 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.
  3. 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.
  4. Commit the top level folder, and you have a new versioned tree, and a local working copy, created from your existing folder.

Laisser un commentaire

Votre adresse de messagerie ne sera pas publiée. Les champs obligatoires sont indiqués avec *