Reference
crab reset
Unstage files from the Crab staging area.
Synopsis
crab reset [OPTIONS] [PATTERNS]...Description
crab reset mirrors git reset HEAD -- <paths> and removes the corresponding
chunk data from the local Crab staging area.
For conceptual background, see Resetting Staged Files.
Arguments
| Argument | Required | Description |
|---|---|---|
PATTERNS | No | Glob patterns to unstage. If omitted, unstages all. |
Options
| Option | Default | Description |
|---|---|---|
--dry-run | false | Preview what would be unstaged |
--sync | false | Clean orphaned staging data after external Git resets or removals |
Examples
Reset specific files
crab reset '*.bin'Reset everything
crab resetSynchronize staging after a direct Git operation:
crab reset --syncStart with --dry-run when a pattern could match multiple files. A normal reset
updates both the Git index and Crab's local staging records for the matched
paths. --sync is different: it reconciles staging after a direct git reset,
git rm, or similar index change. Verify the result with git status --short
and crab staging stats before deleting any remaining staging data.
Related commands
crab add: stage files.crab staging: inspect the staging area.crab status: check file state.