How It Works
Automatic Detection
Files above the threshold (default: 2MB) are automatically chunked:- Hashed independently
- Stored if new
- Deduplicated if it already exists
Manifest
A manifest file tracks the chunks:Configuration
Threshold
Set the large file threshold in.wit/config:
| Size | Bytes |
|---|---|
| 1 MB | 1048576 |
| 2 MB | 2097152 |
| 5 MB | 5242880 |
| 10 MB | 10485760 |
Chunk Size
Usage
Adding Large Files
Just useadd as normal:
- Detect the file is above threshold
- Split into chunks
- Store chunks efficiently
- Create manifest
Status with Large Files
Diff with Large Files
Benefits
Space Efficiency
| Scenario | Git | wit |
|---|---|---|
| 100MB file, 1 byte change | +100MB | +2MB (1 chunk) |
| Same chunk in 10 files | 10x stored | 1x stored |
| Binary file versions | Full copy each | Only 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
- Built-in to the format
- No server changes needed
- Automatic handling
Comparison with Git LFS
| Feature | Git LFS | wit |
|---|---|---|
| Setup required | Yes | No |
| Server support | Required | Not needed |
| Deduplication | File-level | Chunk-level |
| Partial changes | Full re-upload | Only changed chunks |
| Tracking file | .gitattributes | Automatic |
Best Practices
Troubleshooting
File not being chunked
File not being chunked
Check the threshold:Ensure the file is larger than this value.
Slow performance with many chunks
Slow performance with many chunks
Try increasing chunk size:
Repository size growing
Repository size growing
Run garbage collection: