tags:

views:

23

answers:

1

I'm able to list git stashes by date with

git stash list --date=local

but how do I select a revision without getting

fatal: Needed a single revision
+2  A: 

You need to put quotation marks around the date:

git stash show -p stash@{Friday Smarch 13 13:13:13 2013}

won't work, while

git stash show -p stash@{"Friday Smarch 13 13:13:13 2013"}

works. (With the date given, it actually gave me the most recent stash, rather than saying it was invalid!)

Andrew Grimm
For future readers, this is just an issue of the shell requiring escaping of a single argument with embedded spaces. Either quoting the whole thing (`"stash@{Friday Smarch 13 13:13:13 2013}"`) or individually escaping each space (`stash@{Friday\ Smarch\ 13\ 13:13:13\ 2013}`) would work just as well.
Greg Hewgill