.wit directory contains all repository data and metadata.
Overview
Key Files
HEAD
Points to the current branch or commit. When on a branch:config
Repository configuration in INI format:index
The staging area in JSON format:journal.json
Operation history forwit undo:
Directories
objects/
Content-addressable storage for all data. Object types:- blob - File contents
- tree - Directory listings
- commit - Commit metadata
- large-file - Large file manifest
refs/
References to commits (branches and tags). heads/ - Local branches:hooks/
Executable scripts triggered by operations.branch-states/
Auto-stashed changes per branch (wit-specific):logs/
Reference logs (reflog) for recovery:Object Storage Details
Object Format
Objects are compressed and stored by hash:Large File Storage
Files above threshold are stored as chunks:Comparison with Git
| wit | Git | Notes |
|---|---|---|
index (JSON) | index (binary) | wit is human-readable |
journal.json | (none) | wit tracks all operations |
branch-states/ | (none) | wit auto-stash |
| SHA-1 (Git compatible) | SHA-1 | Full GitHub/GitLab interop |
| Large file chunks | (external LFS) | wit is built-in |
Troubleshooting
Corrupt repository
Corrupt repository
Run integrity check:This verifies all objects.
Lost commits
Lost commits
Check the reflog:Or the journal:
Repository too large
Repository too large
Run garbage collection: