If you like to use stash just to keep your workspace clean, you should learn how to drop them.
A stack of old stashes is a recipe for conflicts later. So it’s always a good measure to maintain that stash list clean.
When you are done with a stash, make sure to use git stash drop.
If you want to drop a specific stash, you can always use the curly brackets notation to reference it:
1
git stash drop stash@{1}
If you don’t pass an index, it drops the most recent one (stash@{0}).
Want the full explanation with examples? I covered it here: Learn why the command git stash drop is useful
Follow along for more git tips like this!
Related Articles
git Learn why the command git stash drop is useful
Understand when to use git stash drop how it works
git Using git stash: pop, apply, and drop
Understand how to use git stash and git stash pop for real
english Your Git stashes live in a stack
Git stashes pile up like a stack — newest is always stash@{0}, and git stash pop grabs that one first.