git: empty stash
β’ 112 words β’ 1 min
There are too many entries in my git stash:
shell
% git stash list | wc -l
69I would like to completely empty it, nothing there matters, it’s all draft junk accumulated over months.
shell
% git stash clearVerification:
shell
% git stash list | wc -l
0That’s all! It’s the first time I ran this command.
Normally I do this instead:
shell
% git stash dropdrop
Remove a single stash entry from the list of stash entries.
In zsh land, if I hadn’t learned about stash clear, I could have done
the following instead:
shell
% repeat 100 git stash drop…popping each entry one by one.