Skip to main content
Documentation
CLI Reference

Local Lock Commands

Record editing intent inside one repository. These locks are local advisory metadata, not remote team coordination.

CommandCurrent behaviorUsage
lockCreate a local advisory lock recorddits lock [OPTIONS] <PATH>
unlockRelease a local lock recorddits unlock [OPTIONS] <PATH>
locksList active local lock recordsdits locks [OPTIONS]

dits lock

Adds a path, owner, expiry time, and optional reason to .dits/locks.json. The owner is derived from Git's user.email when available, then from the local system user. The default time to live is eight hours.

# Create a local record with the default TTL
dits lock footage/scene01.mov --reason "Color pass"

# Choose a TTL in hours
dits lock footage/scene01.mov --ttl 2

# Replace an existing local record deliberately
dits lock footage/scene01.mov --force

dits locks

# List active records
dits locks

# Include full local record details
dits locks --verbose

# Filter by the stored owner identifier
dits locks --owner editor@example.com

Expired records are omitted from listings. A list is a snapshot of one local lock file; it does not query another workstation or a service.

dits unlock

# Release a record owned by the current local identity
dits unlock footage/scene01.mov

# Override the owner check for this local record
dits unlock footage/scene01.mov --force

See the status and roadmap for the remote-lock boundary and file commandsfor local staging and commits.