Repository Commands
Create, clone, and manage Dits repositories. These foundational commands set up your version control environment for large binary files.
| Command | Description | Usage |
|---|---|---|
| init | Initialize a new repository | dits init [OPTIONS] [PATH] |
| clone | Clone a repository | dits clone [OPTIONS] <URL> [DIR] |
| remote | Manage remote repositories | dits remote <SUBCOMMAND> |
| status | Show working tree status | dits status [OPTIONS] [PATH] |
dits init
Initialize a new Dits repository in the current or specified directory. Creates the .dits directory structure and sets up initial configuration.
Synopsis
dits init [OPTIONS] [PATH]Arguments
PATH- Directory to initialize (default: current directory)
Options
--bare Create a bare repository (no working directory)
--template <PATH> Use custom template directory
--initial-branch <NAME> Set initial branch name (default: main)
--shared Set up for shared/team use with relaxed permissionsExamples
# Initialize in current directory
$ dits init
Initialized empty Dits repository in /home/user/project/.dits/
# Initialize in specific directory
$ dits init my-project
Initialized empty Dits repository in /home/user/my-project/.dits/
# Initialize with custom initial branch
$ dits init --initial-branch production
Initialized empty Dits repository with branch 'production'
# Create a bare repository for sharing
$ dits init --bare project.dits
Initialized empty bare Dits repository in /home/user/project.dits/Repository Structure
.dits
HEADCurrent branch reference
configRepository configuration
indexStaging area
objects
chunksContent chunks
assetsAsset manifests
treesTree manifests
commitsCommit objects
packsPacked objects
refs
headsLocal branches
remotesRemote tracking
tagsTags
hooksRepository hooks
dits clone
Clone a repository from a remote source. Supports partial clones for large repositories - download metadata first, then hydrate files on demand.
Synopsis
dits clone [OPTIONS] <URL> [DIRECTORY]Arguments
URL- Repository URL (https://, dits://, or local path)DIRECTORY- Local directory name (default: derived from URL)
Options
--shallow Clone only latest commit (no history)
--depth <N> Clone only last N commits
--branch <NAME> Clone specific branch
--single-branch Clone only one branch
--no-checkout Clone without checking out files
--sparse Enable sparse checkout (partial working dir)
--filter <SPEC> Partial clone filter (e.g., blob:none)
--progress Show progress during cloneExamples
# Basic clone
$ dits clone https://dits.example.com/team/project
Cloning into 'project'...
remote: Counting objects: 1,234
remote: Total 1,234 (delta 0)
Receiving objects: 100% (1,234/1,234), 45.2 MB | 12.3 MB/s
Resolving deltas: 100% (567/567)
Hydrating files: 100% (89/89), done.
# Clone to specific directory
$ dits clone https://dits.example.com/team/project my-copy
# Clone specific branch
$ dits clone --branch feature/vfx https://dits.example.com/team/project
# Shallow clone (metadata only - fastest)
$ dits clone --filter blob:none https://dits.example.com/team/project
Cloning into 'project'...
Metadata fetched: 15 MB
Repository ready (125 TB of files available on demand)
# Clone with limited history
$ dits clone --depth 10 https://dits.example.com/team/projectPartial Clones for Large Repositories
For repositories with hundreds of gigabytes or terabytes of data, use
--filter blob:none to download only metadata. Files will be fetched on-demand when accessed. This provides instant access without waiting for full downloads.dits remote
Manage connections to remote repositories. Configure where to push and pull changes.
Subcommands
dits remote (list)
dits remote [-v]
List configured remotes. Use -v to show URLs.dits remote add
dits remote add <NAME> <URL>
Add a new remote.dits remote remove
dits remote remove <NAME>
Remove a remote.dits remote rename
dits remote rename <OLD> <NEW>
Rename a remote.dits remote set-url
dits remote set-url <NAME> <URL>
Change a remote's URL.dits remote show
dits remote show <NAME>
Show detailed information about a remote.Examples
# List remotes
$ dits remote
origin
# List with URLs
$ dits remote -v
origin https://dits.example.com/team/project (fetch)
origin https://dits.example.com/team/project (push)
# Add a remote
$ dits remote add backup https://backup.example.com/project
Remote 'backup' added.
# Show remote details
$ dits remote show origin
* remote origin
Fetch URL: https://dits.example.com/team/project
Push URL: https://dits.example.com/team/project
HEAD branch: main
Remote branches:
main tracked
feature/vfx tracked
Local branch configured for 'dits pull':
main merges with remote main
# Change remote URL
$ dits remote set-url origin https://new.example.com/project
# Remove a remote
$ dits remote remove backupdits status
Show the current state of the repository and working directory. Displays staged changes, modified files, and untracked files.
Synopsis
dits status [OPTIONS] [PATHSPEC...]Options
-s, --short Give output in short format
-b, --branch Show branch info even in short format
--porcelain Machine-readable output (for scripts)
--ignored Show ignored files
--untracked <MODE> Show untracked files (no, normal, all)Examples
# Full status
$ dits status
On branch main
Your branch is up to date with 'origin/main'.
Changes to be committed:
(use "dits restore --staged <file>..." to unstage)
new file: footage/scene03.mov
Changes not staged for commit:
(use "dits add <file>..." to update what will be committed)
(use "dits restore <file>..." to discard changes)
modified: project.prproj
Untracked files:
(use "dits add <file>..." to include in what will be committed)
footage/test-shots/
# Short format
$ dits status -s
A footage/scene03.mov
M project.prproj
?? footage/test-shots/
# Machine-readable format
$ dits status --porcelain
A footage/scene03.mov
M project.prproj
?? footage/test-shots/
# Check specific path
$ dits status footage/
On branch main
Changes not staged for commit:
modified: footage/scene01.movStatus Codes
| Code | Staged | Unstaged |
|---|---|---|
| A | Added | - |
| M | Modified | Modified |
| D | Deleted | Deleted |
| R | Renamed | - |
| ?? | - | Untracked |
| !! | - | Ignored |
Related Commands
- File Commands - Add, stage, and manage files
- Remote Commands - Push, pull, and sync
- Branch Commands - Create and manage branches
Related Topics
- Repository Concepts - Understanding Dits repositories
- Configuration - Configure repository settings