How to delete a stash created with git stash create?

git stash drop takes no parameter – which drops the top stash – or a stash reference which looks like: stash@{n} which n nominates which stash to drop. You can’t pass a commit id to git stash drop.

git stash drop            # drop top hash, stash@{0}
git stash drop stash@{n}  # drop specific stash - see git stash list

Dropping a stash will change the stash@{n} designations of all stashes further down the stack.

I’m not sure why you think need to drop a stash because if you are using stash create a stash entry isn’t created for your “stash” so there isn’t anything to drop.

Leave a Comment