Local File Commands
Stage, restore, commit, temporarily set aside, clean, and archive local repository content.
dits rm or dits mv. Do not rely on examples written for those nonexistent commands. Check dits status after filesystem changes and keep an independent backup while evaluating deletion and rename workflows.| Command | Current behavior | Usage |
|---|---|---|
| add | Stage one or more local files or directories | dits add <PATH>... |
| restore | Restore or unstage selected local paths | dits restore <PATH>... [OPTIONS] |
| commit | Create a local commit from the index | dits commit -m <MESSAGE> |
| stash | Manage local working-tree stashes | dits stash [ACTION] [OPTIONS] |
| clean | Preview or remove untracked working-tree paths | dits clean (-n | -f) [OPTIONS] [PATH]... |
| archive | Archive paths selected by a local ref using available worktree bytes | dits archive [TREE_ISH] [OPTIONS] |
dits add
Stages each supplied file or directory for the next commit. The command has no current flags: options such as --all, --dry-run, --patch, and --forceare not accepted.
dits add notes.txt
dits add footage/ graphics/
dits add .
dits statusdits restore
Restores required paths from the default source or a commit selected with --source. Use --staged to unstage and --worktree to select the working tree explicitly. The parser also accepts --ours and --theirs, but merge-conflict restoration is not complete in this alpha.
dits restore notes.txt
dits restore --source <commit-id> footage/scene.mov
dits restore --staged notes.txt
dits restore --worktree notes.txtdits commit
Creates a local commit from staged state. A message is required.
dits commit --message "Add review assets"dits stash
Supported actions are push, pop, apply, list, drop, clear, and show. Use --messagewith push and --index to choose a stash for an action that accepts one.
dits stash push --message "Before alternate cut"
dits stash list
dits stash show --index 0
dits stash apply --index 0
dits stash drop --index 0dits clean
Operates on untracked working-tree paths, not historical repository objects. Preview mode or force is required. -d includes directories, -x includes ignored files, -Xselects only ignored files, and --exclude preserves matching paths.
# Always preview the exact scope first
dits clean --dry-run
dits clean --dry-run -d renders/
# Destructive: removes the previewed untracked paths from the working tree
dits clean --force -d renders/clean --force deletes untracked working-tree data. Confirm the dry-run output and backup anything you may need before using it. This is separate from dits gc --dry-run, which only reports unreachable repository-object candidates and never deletes them.dits archive
Creates tar, tar.gz, or zip output. A resolvable local commit, branch, or tag selects the manifest paths, but the current implementation reads available bytes from the working tree and skips selected paths that are absent there. Verify the archive; do not treat it as a guaranteed byte-exact historical export. Use --prefix to place members below a directory, --output to select the file, and trailing paths to limit the selection.
dits archive HEAD --format tar.gz --output review.tar.gz
dits archive main --format zip --output footage.zip -- footage/Use dits <command> --help for exact parser syntax and see maintenance commands for integrity and storage inspection.