How can I display dates when local updates were made to a git repo?

375 views Asked by At

For example:

  • How can I display when HEAD@{2} was created?
  • Given a commit's SHA1, how can I display the date it was pulled into the current repo, rather than (or in addition to) its commit date?

I thought there would be a git reflog option for this, but as far as I can see, there is not.

1

There are 1 answers

5
sleske On BEST ANSWER

git reflog --date=iso

will show the reflog with dates.

This is mentioned indirectly in the manpage:

The subcommand "show" (which is also the default, in the absence of any subcommands) will take all the normal log options[...]

For more controle over the reflog formatting, you can also use git log -g, which also shows the reflog.