Clean up your Git stash list with git stash drop

calendar_today timer Reading time ~1 minute

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:

class="highlight">
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!

animated jess' signature

Related Articles