Git Cheat Sheet · Set aside
Delete a stash
git stash drop
git stash drop deletes the most recent stash from the list without applying it. git stash drop stash@{n} targets another one, and git stash clear empties the whole list.
What it does
Removes a stash from the reserve without applying it.
A use case
An old experiment set aside will not be used after all.
Warning: The changes it contained are lost.
On the command line
git stash drop- Deletes the last stash.
git stash drop stash@{1}- Deletes a specific stash.
git stash clear- Deletes all stashes.
In Merathon
- "Stashes" section, right-click the stash → "Delete".
Frequently asked questions
Can I recover a deleted stash?
As long as Git has not cleaned up, yes: git fsck --unreachable | grep commit finds it, then git stash apply <hash>.