How do I only Checkout (pull down) only parts of an SVN tree with TortoiseSVN?

I’m using TortoiseSVN and I want to do a Checkout of an existing repository into a local directory. However, I only want to pull down certain portions of the file tree. Is there a way I can do that?

For instance:

  • How to cope with “rejected” on git push?
  • How do I use octal characters in a git checkout?
  • meaning of -‌- in git checkout
  • How to achieve 'pre-checkout' hook in Git/bitbucket?
  • Git checkout revision of local repository
  • Can not figure out how checkout works in git
  • /trunk
        /project-A
        /project-B
        /project-C
    

    Let’s say I just want to pull down trunk, project-A and project-B. How do I do that?

  • SVN Website Development and Deployment Solution
  • git svn dcommit fails because of assertion error “svn_fspath__is_canonical(child_fspath)” (cygwin)
  • How to use a revision control system in general
  • How change default SVN username and password to commit changes?
  • Using NAnt and Ivy to build a VB6 project
  • Perforce for a Subversion user?
  • 5 Solutions collect form web for “How do I only Checkout (pull down) only parts of an SVN tree with TortoiseSVN?”

    It looks like you were successful but I wanted to include a step-by-step guide in the hopes that it is helpful to others.

    1. Checkout trunk into a working copy with depth = “Only this item”
    2. Open working copy
    3. Go to repo browser from the working copy
    4. Select your desired project subfolder(s), right-click and select “Update item to revision”

    This will pull only the subfolder(s) you’ve selected into your working copy.

    This may be coming late, but for anyone finding this question and wondering if you could exclude existing directories: there appears to be a way to do so.

    1. Right click on the directory you want to exclude
    2. TortoiseSVN -> Update To Revision…
    3. From the Update Depth drop-down box select Exclude and press OK

    That should delete the directory if it doesn’t have any local mods and exclude it from further updates. If you ever need the directory back, use Michael Hackner’s method above.

    Expanding on autonomy’s answer from above …

    If you have checked out a whole project and later want to exclude certain folders or files from it….

    1. Right click on the parent directory that contains the dir/file you want to exclude
    2. TortoiseSVN -> Update To Revision…
    3. From the Update Depth drop-down box select Exclude and the click on “Choose items…” and
      • select the items you want to keep
      • and deselect the items you want to exclude
      • then press OK & OK again

    That should delete the directories/files you have deselected and exclude them from further updates. If you ever need the directory back, repeat the process and change your selection.

    If you go into the project-A folder and right-click==>SVN Update, it will only update the project-A folder and it’s subfolders. Then you can do the same for project-B

    This works as well:

    1. Right click > Select SVN Checkout
    2. Select “Choose items…”
    3. Select the subfolders/items you want [1]

    [1] – Do note that if you checkout subfolders partially (without all the items inside that subfolder), and files are subsequently added to that subfolder and committed, you will not get them when you perform a regular checkout.

    This question is related to Can you do a partial checkout with Subversion? but with a particular context of using TortoiseSVN.

    Git Baby is a git and github fan, let's start git clone.