Skip to main content
Partial clone allows you to clone large repositories without downloading all objects upfront. Combined with sparse checkout, you can work with only the parts of a repository you need.

Overview

Partial clone provides:
  • Blobless clones - Skip large file contents until needed
  • Treeless clones - Skip tree objects for faster clone
  • Sparse checkout - Only checkout specific directories
  • On-demand fetching - Objects fetched when accessed

Quick Start

Clone Filters

Blobless Clone

Skip all blobs (file contents) during clone:
Blobs are fetched when you:
  • Checkout a file
  • Run wit diff
  • Read file contents

Blob Size Limit

Only skip blobs larger than a threshold:

Treeless Clone

Skip trees and blobs (fastest clone):
Only commit objects are downloaded initially.

Sparse Checkout

Sparse checkout limits which files are checked out to your working directory.

Enable Sparse Checkout

Cone Mode

Cone mode (default) only allows directory-based patterns for better performance:

Patterns

Disable Sparse Checkout

Configuration

Enable Partial Clone Mode

Sparse Checkout Configuration

Patterns are stored in .wit/info/sparse-checkout:

Object Availability

Check where objects are stored:

Fetching Objects

Automatic Fetching

Objects are fetched automatically when accessed:

Manual Fetching

Workflow Examples

Large Monorepo

Large Binary Assets

Documentation Contribution

Programmatic Usage

Statistics

Monitor partial clone usage:

Troubleshooting

Object Not Available

Sparse Checkout Conflicts

Performance Issues

Comparison with Git

Best Practices

  1. Use sparse checkout for large repos you only partially need
  2. Set blob limits to skip large binaries
  3. Pre-fetch before offline work with wit fetch --path
  4. Monitor usage with wit partial-clone status