简体   繁体   中英

Is it possible to choose a git stash when they're described by the date stashed?

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

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!)

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM