If you know the hash of the stash commit you dropped, then you can easily apply it as a stash:
git stash apply $stash_hash
You can also create a separate branch for it with
git branch recovered $stash_hash
You can do whatever you want with all the normal tools. When you’re done, just blow the branch away.
Let us talk about finding the hash:
Case 1: If you have only just popped it and your terminal is still open that means you will still have the hash value printed by git stash pop on screen.
Case 2: Otherwise, you can find it by using the following methods:
Linux, Unix or Git Bash command:
git fsck --no-reflog | awk '/dangling commit/ {print $3}'
Powershell command:
git fsck --no-reflog | select-string 'dangling commit' | foreach { $bits = $_ -split ' '; echo $bits[2];}
This will display your all the commits at the tips of your commit graph which are no longer referenced from any branch or tag – every lost commit, including all stash commits you’ve ever created will be somewhere in that graph.
Again, the easiest way to find the stash commit you want is probably to pass that list to gitk:
gitk --all $( git fsck --no-reflog | awk '/dangling commit/ {print $3}' )
Now in order to spot stash commits, look for commit messages of this form:
WIP on somebranch: commithash Some old commit message
Remember: The commit message will only be in this form (starting with "WIP on") if you did not supply a message when you did git stash.