Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is there a way to cause git-reflog to show a date alongside each entry?

The git-reflog command doesn't by default show a date alongside each entry, which strikes me as a strange oversight; I think this would be very helpful.

Are there any command-line options, or other tweaks, which can be employed to cause it to show when each reflog entry was added? The manpage isn't forthcoming...

like image 378
Andrew Ferrier Avatar asked Jun 28 '13 16:06

Andrew Ferrier


People also ask

What is the difference between git Reflog and log?

The biggest difference between Git reflog vs. log is that the log is a public accounting of the repository's commit history while the reflog is a private, workspace-specific accounting of the repo's local commits. The Git log is part of the Git repository and is replicated after a push, fetch or pull.

What is the default setting of git Reflog?

By default, the reflog expiration date is set to 90 days. An expire time can be specified by passing a command line argument --expire=time to git reflog expire or by setting a git configuration name of gc.

What information does git Reflog?

DESCRIPTION. Reference logs, or "reflogs", record when the tips of branches and other references were updated in the local repository. Reflogs are useful in various Git commands, to specify the old value of a reference. For example, HEAD@{2} means "where HEAD used to be two moves ago", master@{one.

Does Reflog get pushed?

Answer is no. Anonymous objects--objects that are only referenced by your reflog--are private to the local repo.


1 Answers

Per the man page, you can use git log options, e.g.,

git reflog --pretty=short  git reflog --date=iso 
like image 184
Balog Pal Avatar answered Sep 21 '22 10:09

Balog Pal