Git Stash
Git Stash temporarily saves chosen uncommitted working-tree and index changes. Saved sets form a stack and can be restored later.
Another example
A developer labels an unfinished experiment and stashes tracked plus needed untracked files. They fix an urgent issue, then apply the stash on the original branch.
Main parts
- 01Branch or change set
- 02Review and verification gate
- 03Released result
Use it when
Use it for a short task switch when a temporary commit or worktree would be excessive.
Do not use it when
Do not use stash as long-term storage, forget untracked files, apply it on unrelated branches, or expect remote backup.
Name used in code
git stash push/list/show/apply/drop Before you ship
Before publishing, check the exact repository, branch, target, and diff. Keep unpublished work. Pass review and CI checks. Record conflict and data-loss risks, release order, traceability, recovery, and rollback.
Outcome: Use Git Stash to release or recover the change safely, with a clear record. User context: A developer labels an unfinished experiment and stashes tracked plus needed untracked files. They fix an urgent issue, then apply the stash on the original branch. Delivery concept or operation: Git Stash. Why it fits: Use it for a short task switch when a temporary commit or worktree would be excessive. Do not use it when: Do not use stash as long-term storage, forget untracked files, apply it on unrelated branches, or expect remote backup. Delivery requirements: Name the code repository and target. List preconditions, changes, review and CI checks, conflict and data-loss risks, release order, and the rollback or recovery command. Repository safeguards: Keep unpublished work and a clear history. Do not run destructive steps without an explicit backup. Check the exact code diff and remote target before publishing. Acceptance criteria: Review the intended diff and pass all required checks. Keep the target version traceable. Practice failure recovery and keep published history clear. Evidence and limits (evidence boundary): It is official for that source. Other platforms or teams may use the term in another way. Unknowns to confirm: Repository, branch, team activity, release environment, approval owner, protected checks, and rollback target.
Check this request
Review the current use of Git Stash. Definition: Git Stash temporarily saves chosen uncommitted working-tree and index changes. Saved sets form a stack and can be restored later. Release checks: Before publishing, check the exact repository, branch, target, and diff. Keep unpublished work. Pass review and CI checks. Record conflict and data-loss risks, release order, traceability, recovery, and rollback. Before changing code, report the evidence you found, gaps, severity, and the smallest safe fix.