Reference
crab lock
Lock files to prevent concurrent edits.
Synopsis
crab lock [OPTIONS] <PATHS>...
crab unlock [OPTIONS] <PATHS>...
crab locks [OPTIONS]Description
crab lock acquires an advisory lock on one or more files, preventing other
users from pushing changes to them. This is useful for binary files where a
Git merge would not produce a meaningful result.
Locks are stored in the remote object store alongside your data, making them visible to all collaborators.
For conceptual background, see File Locking.
Arguments
| Argument | Required | Description |
|---|---|---|
PATHS | Yes | One or more paths to lock |
Options
| Option | Default | Description |
|---|---|---|
-j, --json | false | Emit machine-readable JSON output |
Examples
Lock a file
crab lock models/character.fbx models/material.binUnlock a file
crab unlock models/character.fbxList all locks
crab locksForce-break a stale lock
crab unlock --force models/character.fbxVerify ownership with crab locks --path <PATH> before using --force.
Advisory locks coordinate Crab clients but do not stop edits made outside that
workflow. Acquire the lock before editing, publish or abandon the change, then
release it. A failed lock acquisition should be treated as a writer conflict,
not bypassed without contacting the recorded owner.
Related commands
crab push: publish changes while respecting locks.crab status: inspect file state.