Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

Tags:

git

reflog

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.

like image 549
wchlm Avatar asked Oct 30 '13 20:10

wchlm


1 Answers

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.

like image 70
sleske Avatar answered Oct 18 '22 09:10

sleske