Importing Existing Files in the Repository

Most projects start with a prototyping phase or are based on skeleton code generated by an IDE such as Xcode or Eclipse and will have existing files that need to be placed under version control.

In order to place your project under version control you will need to import your existing files and folders into your Subversion repository:

  1. Use the repository browser to locate and select the folder into which your files should be imported.

  2. Select the File > Import… menu item.

  3. Alternatively, either right-click on the receiving folder and select Import… from the action menu, or click the Import button Import Toolbar Icon in the toolbar.

  4. A standard open panel is displayed. Select the files and folders to import. You can select multiple items if necessary.

  5. You can specify a different name for the selected file or folder in the Import As field when a single item is selected.

  6. Uncheck Include sub-folders if you only wish to import files located immediately within the selected folder.

  7. Uncheck Ignore files according to my global ignores settings if you want all files to be imported, regardless of whether they match the global ignore patterns specified in your Subversion configuration.

  8. Click the Import button.

  9. You will be prompted for a log message. Optionally enter text describing why you are importing the files before clicking Commit.

The resultant repository revision will be visible in the repository’s transcript following successful completion of the import.

Be aware that Subversion will import all files which do not match the global ignore list.

As a result you should be careful to remove all temporary files which should not be placed under version control (such as those generated by compilers and linkers) from your project before proceeding with the import.

You can also drag a file or folder from the Finder to import it. The dragged item will be imported into the folder onto which it was dropped.

Hold down the Option (⌥) key to display additional import options when you drop a file or folder onto the repository browser.

Cornerstone will always copy files into the repository. Your original files will be left untouched.

Once you have imported your files you will need to check out a working copy before you can edit them.