crab unadopt
Reverse a crab adopt operation before the
changes are committed. Crab reads the original bytes from the staging area,
writes full files back to disk, and removes the files from the Git index.
Synopsis
crab unadopt [OPTIONS]| Option | Description |
|---|---|
-p, --pattern <PATTERN> | Restrict restoration to matching pointer files |
--json | Emit structured JSON output |
crab unadopt --pattern '*.bin'
crab unadopt --jsonConfirm the pre-commit boundary
crab unadopt is a pre-commit reversal. It depends on the staged chunks created
by the earlier adopt operation and restores the working-tree bytes from that
local state. It is not a history-rewrite command and does not recover content
after the required staging data has been removed.
Inspect the path before and after restoration:
git diff --cached --name-only
crab unadopt --pattern 'models/*.bin'
git status --shortThe selected paths should return to full files and leave the Git index. Review the remaining staged set before committing. A pattern restricts which detected pointers are restored; quote shell globs so Crab, rather than the shell, matches them.
Use crab undo when you want Crab to detect
reversible staged pointer changes automatically. Use a Git history operation
for a change that is already committed.