Subversion Tip of the Week

Performing Shallow Checkouts

A standard Apache Subversion checkout includes the whole file and directory content of a specified repository. If you don’t require this level of content, you can perform a ‘shallow checkout’ that prevents Subversion from descending recursively through the repository, by restricting the depth of the checkout.

This is achieved by running the ‘svn checkout’ command as normal, but with an additional command:

  • –depth immediates: checkout the target and any of its immediate file or children. Note that the children themselves will be empty.
  • –depth files: checkout the target and any of its immediate file children.
  • –depth empty: checkout the target only. None of its file or children will be included in the operation.

In this example we are performing a shallow checkout on a ‘bug fix branch’ located within the branches folder, and specifying that only the immediate file children should be included (–depth files):

depth files

If you’re using SmartSVN, the cross-platform graphical client for Subversion you can set the checkout depth from the drop down menu when performing your checkout.

smartsvn depth

Not yet started with SmartSVN? Claim your free 30 day trial at

0 Responses to “Subversion Tip of the Week”

  • No Comments

Leave a Reply