As far as I know Git can not delete a stash by name/message (despite it can save it by name with git stash save "name"). However, I really like to have this option for a 'combined alias' that I want to create for my workflow (especially for colleagues that are not that familiar with git and should respect the workflow)
I know I can create a bash script myself but I was thinking maybe someone already has made such a script!? So that I can delete a stash by name...
My "update" alias is roughly like this:
git stash save -u "tempstash"
git fetch origin
[apply our workflow/update strategy]
git stash pop --index (should be: git stash delete "tempstash")
The problem with the current alias is that if there is nothing to stash, it will restore an old stash.
An other option would be to check if stashing is needed but I always wanted a git stash delete by name option so thats why im asking this.
PS: im using posh-git but bash commands should work within an alias.
Thanks