Repositories
A Dits repository is a directory that tracks the history of your files, storing all versions efficiently using content-addressed chunks.
Creating a Repository
Initialize a new repository with dits init:
$ mkdir my-project
$ cd my-project
$ dits init
Initialized empty Dits repository in /home/user/my-project/.dits
Created default branch: mainOr clone an existing repository:
$ dits clone https://example.com/team/project
Cloning into 'project'...
Fetching metadata... done
Repository cloned (12 commits, 45 GB)Repository Structure
A Dits repository consists of two main parts: the working directory (your files) and the .dits directory (version control data).
Key Components
.dits/objects directory contains all versioned data as content-addressed objects (chunks, assets, commits)..dits/refs and point to commit hashes.The Staging Area (Index)
Like Git, Dits has a staging area that sits between your working directory and the repository. When you run dits add, files are staged (chunked and hashed) but not yet committed.
Working Directory → Staging Area → Repository
(dits add) (dits commit)
$ dits add footage/scene1.mov
Chunking footage/scene1.mov... 10,234 chunks
$ dits status
Changes to be committed:
new file: footage/scene1.mov
$ dits commit -m "Add scene 1 footage"
[main a1b2c3d] Add scene 1 footage
1 file changed, 10 GB addedRepository Configuration
Each repository has its own configuration in .dits/config:
# .dits/config
[core]
repositoryformatversion = 0
[remote "origin"]
url = https://example.com/team/project
fetch = +refs/heads/*:refs/remotes/origin/*
[branch "main"]
remote = origin
merge = refs/heads/main
[user]
name = Jane Editor
email = jane@example.comConfiguration Priority
~/.ditsconfig), which overrides system config (/etc/ditsconfig).Bare Repositories
A bare repository has no working directory - only the .ditscontents. These are typically used for central/server repositories.
$ dits init --bare project.dits
Initialized empty bare Dits repository in /home/user/project.dits
$ ls project.dits/
config HEAD hooks/ objects/ refs/Repository States
Your working directory can be in various states relative to the repository:
Clean
Working directory matches the latest commit.
$ dits status
On branch main
nothing to commit, working tree cleanModified
Files have been changed but not staged.
$ dits status
On branch main
Changes not staged for commit:
modified: footage/scene1.movStaged
Files have been added to the staging area.
$ dits status
On branch main
Changes to be committed:
modified: footage/scene1.movUntracked
New files that aren't yet tracked by Dits.
$ dits status
On branch main
Untracked files:
footage/new_scene.movIgnoring Files
Create a .ditsignore file to exclude files from version control:
# .ditsignore
# Temporary files
*.tmp
*.bak
# OS files
.DS_Store
Thumbs.db
# Render outputs (regeneratable)
/renders/
# Cache directories
.cache/
*.cache
# NLE autosave files
*.autosave
*.prproj.tmpRepository Size
Check the size of your repository with dits du:
$ dits du
Object Store:
Chunks: 45,892 objects (12.5 GB)
Assets: 1,234 objects (2.1 MB)
Trees: 89 objects (156 KB)
Commits: 42 objects (84 KB)
Total repository size: 12.5 GB
Working directory size: 45.2 GB
Deduplication ratio: 3.6xMaintenance
Dits repositories occasionally need maintenance to optimize performance:
Garbage Collection
Remove unreferenced objects to free space:
$ dits gc
Finding unreachable objects...
Found 234 unreachable chunks (567 MB)
Removing unreachable objects... done
Freed 567 MBIntegrity Check
Verify all objects are intact:
$ dits fsck
Checking 45,892 chunks...
Checking 1,234 assets...
Checking 89 trees...
Checking 42 commits...
All objects verified. No corruption detected.Next Steps
- Learn about Commits & History
- Understand Branching & Merging
- Set up Remote Repositories