Skip to main content
Documentation

Repository Commands

Create, clone, and manage Dits repositories. These foundational commands set up your version control environment for large binary files.

CommandDescriptionUsage
initInitialize a new repositorydits init [OPTIONS] [PATH]
cloneClone a repositorydits clone [OPTIONS] <URL> [DIR]
remoteManage remote repositoriesdits remote <SUBCOMMAND>
statusShow working tree statusdits 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 permissions

Examples

# 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] &lt;URL&gt; [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 clone

Examples

# 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/project

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 backup

dits 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.mov

Status Codes

CodeStagedUnstaged
AAdded-
MModifiedModified
DDeletedDeleted
RRenamed-
??-Untracked
!!-Ignored

Related Commands

Related Topics