commitdog stash gives you an interactive interface for managing Git stashes. If you have no existing stashes, it goes straight to saving your current changes. If stashes already exist, it lists them and lets you choose what to do: pop one back into the working tree, drop one you no longer need, or save a new stash on top of the existing ones.
Usage
Saving a stash
1
Run commitdog stash
If no stashes exist, commitdog goes directly to the save prompt:Enter a short description to make the stash easy to identify later, or press Enter to skip. commitdog includes untracked files in the stash automatically.
2
Confirm the save
After saving, commitdog confirms:If there is nothing to stash (no local changes), commitdog prints a message and exits without creating an empty stash entry.
Restoring or dropping a stash
1
Run commitdog stash
When stashes exist, commitdog lists them with their index and description:
2
Pick an action
- Pop a stash — enter the number (e.g.
1) to apply that stash and remove it from the stash list. If the pop produces conflicts, commitdog prints the conflicted files and instructions for resolving them manually. - Drop a stash — enter
dfollowed by the number (e.g.d2) to delete the stash entry without applying it. - Save a new stash — enter
sto go to the save prompt and add another stash on top of the existing ones. - Quit — enter
qto exit without making any changes.
3
Conflict resolution (if needed)
If popping a stash results in merge conflicts, commitdog exits with instructions:Fix the conflicts in your editor, stage the resolved files, and drop the stash entry manually to complete the operation.