Git stash cleanup
Git stash is often used to hold temporary work that wasn’t yet ready for a commit, perhaps during a rebase. The stash history is per repo. Over time, one may accumulate numerous stash entries that are no longer relevant and may desire to cleanup this clutter.
View Git stash entries by:
git stash list
View the contents of a particular stash entry by:
git stash show -p "stash@{0}"
where the number in braces corresponds to the git stash list
index.
To remove a stash entry, sliding up all the entries older than it:
git stash drop "stash@{N}"
where “N” is the entry index to remove.
If one wishes to recover a dropped Git stash entry, it may be possible: