gut snapshot¶
Instantly save your current work-in-progress - including untracked files - as a timestamped stash entry, without making a formal commit.
Usage¶
When run, gut snapshot:
- Checks if the working tree has any changes (tracked or untracked).
- If changes exist, runs
git stash push --include-untrackedwith an automatic timestamp label. - Tells you the exact command to restore the snapshot.
If the working tree is already clean, it warns you and does nothing.
Example Output¶
[INFO] Creating a timestamped stash snapshot...
[OK] Snapshot saved: 'snapshot: 2024-03-11 10:30:00'
Restore it anytime with: gut stash pop
List all snapshots: gut stash list
Restoring a Snapshot¶
# Restore the most recent snapshot
gut stash pop
# Browse all snapshots
gut stash list
# Apply without removing from the stash
gut stash apply
Difference from gut stash¶
gut snapshot |
gut stash save |
|
|---|---|---|
| Label | Auto-generated timestamp | Optional custom message |
| Untracked files | Always included | Always included |
| Intended use | Quick "save state" button | Named, intentional stash |
See Also¶
gut stash- manage named stash entriesgut whoops- time machine for Git reflog statesgut undo- undo the last commit