GIT stashed date

A stash entry is just a regular git commit internally. So you can read its date ("commit date" or "author date") to know when it was created.

As mentioned in the manpage of git stash, you can use the formatting options for git log when invoking git stash list. So to get the date, you could use git log's option --format:

git stash list --format="%gd: %ci - %gs"

This produces output like:

stash@{0}: 2014-04-23 11:36:39 +0500 - WIP on master: d072412 Do some stuff

That format uses %ci, which prints the committer date in ISO 8601 format. Use %cr for relative dates:

stash@{0}: 8 minutes ago - WIP on master: d072412 Do some stuff

See the manpage of git log (section "PRETTY FORMATS") for more formatting options.


As others said, log formatting applies. If you are looking for the default log format:

git stash list --pretty=medium

To see author and committer dates:

git stash list --pretty=fuller

And to inspect only one stash at a time (stash@{2} in the example):

$ git log -1 --pretty=fuller stash@{2}

Tags:

Git