stash
Stash and restore WIP with tracked context
Stash
Stash and restore work-in-progress while tracking what was being worked on in .ccs/branches/ and .ccs/task.md.
Steps
1. Parse intent
save "<message>"→ stash with message (default if no args: auto-generated message)pop [index]→ restore stashlist→ show stashes with contextdrop <index>→ remove stash
2. Execute
Save:
git status --short→ capture current stategit diff --stat→ what's changedgit stash push -m "<message>"- Update
.ccs/branches/<current>.mdif exists — add stash note
Pop:
git stash list→ available stashes- Read
.ccs/task.md→ find matching stash save entry for context git stash pop <index>git status --short→ show restored state- Display what was being worked on (from task.md)
List:
git stash list --format="%gd|%gs|%cr"- Cross-reference with
.ccs/task.mdstash entries - Display enriched list with context
Drop:
git stash drop <index>
3. Log to .ccs/task.md
Append using template at .claude/skills/_ccs/templates/task-template.md: action, branch, message, files stashed, stash index.
Rules
- Use
git status --short(faster than verbose) - Read
.ccs/task.mdonce for context matching - Keep stash context under 20 lines
- Conflicts from stash pop must be resolved manually
Refs
- Branch refs:
.ccs/branches/ - Task log:
.ccs/task.md - Task template:
.claude/skills/_ccs/templates/task-template.md
10x-Code v2.0.0