Skip to main content
Git LFS is a workaround for a problem wit doesn’t have.
# Git + LFS
git lfs install
git lfs track "*.psd"
# Edit .gitattributes
# Set up LFS on your server
# Hope your CI has LFS installed

# wit
wit add large-file.psd
wit handles large files natively. Automatic chunking, deduplication, no setup.

How It Works

Automatic Detection

Files above the threshold (default: 2MB) are automatically chunked:
Large file (10MB)

┌─────────┬─────────┬─────────┬─────────┬─────────┐
│ Chunk 1 │ Chunk 2 │ Chunk 3 │ Chunk 4 │ Chunk 5 │
│  2MB    │  2MB    │  2MB    │  2MB    │  2MB    │
└─────────┴─────────┴─────────┴─────────┴─────────┘
    ↓           ↓           ↓           ↓           ↓
 hash1       hash2       hash3       hash4       hash5
Each chunk is:
  • Hashed independently
  • Stored if new
  • Deduplicated if it already exists

Manifest

A manifest file tracks the chunks:
{
  "type": "large-file",
  "size": 10485760,
  "chunks": [
    { "hash": "abc123...", "size": 2097152 },
    { "hash": "def456...", "size": 2097152 },
    { "hash": "ghi789...", "size": 2097152 },
    { "hash": "jkl012...", "size": 2097152 },
    { "hash": "mno345...", "size": 2097152 }
  ]
}

Configuration

Threshold

Set the large file threshold in .wit/config:
[wit]
    largeFileThreshold = 2097152  # 2MB in bytes
Common values:
SizeBytes
1 MB1048576
2 MB2097152
5 MB5242880
10 MB10485760

Chunk Size

[wit]
    chunkSize = 2097152  # 2MB chunks

Usage

Adding Large Files

Just use add as normal:
# Add a large file - chunking is automatic
wit add large-video.mp4
wit will:
  1. Detect the file is above threshold
  2. Split into chunks
  3. Store chunks efficiently
  4. Create manifest

Status with Large Files

wit status

Staged:
  large-file: assets/video.mp4 (15.2 MB, 8 chunks)

Diff with Large Files

wit diff assets/video.mp4

Binary file changed
  Before: 15.2 MB (8 chunks)
  After:  16.1 MB (9 chunks)
  Changed chunks: 2 (reusing 7)

Benefits

Space Efficiency

ScenarioGitwit
100MB file, 1 byte change+100MB+2MB (1 chunk)
Same chunk in 10 files10x stored1x stored
Binary file versionsFull copy eachOnly changed chunks

Performance

  • Adding: Faster for files with partial changes
  • Cloning: Only fetch needed chunks
  • Checkout: Stream large files from chunks

No External Dependencies

Git LFS requires:
  • Server support
  • Additional setup
  • Separate tracking file
wit just works:
  • Built-in to the format
  • No server changes needed
  • Automatic handling

Comparison with Git LFS

FeatureGit LFSwit
Setup requiredYesNo
Server supportRequiredNot needed
DeduplicationFile-levelChunk-level
Partial changesFull re-uploadOnly changed chunks
Tracking file.gitattributesAutomatic

Best Practices

Use meaningful chunk sizes
  • Smaller chunks = better deduplication, more overhead
  • Larger chunks = less overhead, worse deduplication
  • 2MB is a good default for most use cases
Consider file types
  • Video/audio: Often benefits from chunking
  • Compressed files (zip, jpg): Less benefit from chunking
  • Text files: Usually below threshold anyway

Troubleshooting

Check the threshold:
wit config wit.largeFileThreshold
Ensure the file is larger than this value.
Try increasing chunk size:
[wit]
    chunkSize = 5242880  # 5MB
Run garbage collection:
wit gc --aggressive