git-stash gives “no valid stashed state found” errors on Windows
Posted by derek in ErrorsWhen using git-stash from a Windows command prompt, I would get errors when trying to manipulate stashes.
For example, after running “git stash” to create a stash, if I later listed the available stashes with “git stash list” (which would return something like “stash@{0}: WIP on mybranch: 669dc9c… My comments”) and then tried to apply the stash with “git stash apply stash@{0}”, I would get the error “fatal: Needed a single revision
stash@0: no valid stashed state found”.
I noticed that the curly braces were missing in the error message, so I had to escape them with “git stash apply stash@\{0\}” to get the command to work.
I also got this error when trying to drop or pop a stash (e.g. “git stash drop stash@{0}”), and had to escape the curly braces here as well.
Tags: curly brace, error, fatal, git, stash, windows








Entries (RSS)