I want to remove all stash\'es, except most recent, from git stash list.
E.g. I want to remove stash 1 to 3 in a single git command:
I would add something extra to below provided answer
If you want to log the index of dropped stashes as well
You can use descending order and $nas shown below
for n in {3..1}; do git stash drop stash@{$n}; done;
The output will be something like..
Dropped stash@{3} (beeaf3629b53d612b1a3fabb7b0c4f77d17e9b71)
Dropped stash@{2} (5a687ca9a93b3190882a9af2c15134e75f063f41)
Dropped stash@{1} (e33dfc42d03166def5dbb60baa975efb21b27f07)