Checking out individual files from a Subversion repository

Subversion does not directly support checking out individual files from a repository, however you can use sparse directories to achieve the same result.

Note: While you can view and work with svn sparse directories in Versions, the initial directory and all file checkouts must be performed using the svn command line.

Checkout an empty directory and individual files

  1. Open the Terminal app and change to the directory where the working copy will be stored, e.g.:
    cd ~/code/
  2. Use the --depth empty parameter to check out an empty directory, where the single files are located, from the server :
    svn checkout --depth empty https://server/branches/directory
  3. Change directory into the working copy:
    cd directory
  4. Use the svn update command to checkout invididual files:
    svn update filename
  5. (Optional) Use the ls command in the working copy directory to verify the files have been checked out:
    ls ~/code/subdirectory
  6. Add the new working copy to Versions: Click Bookmarks > New Working Copy Bookmark and follow the prompts