I see lots of great answers in Pretty git branch graphs that show the oneline option for git log
being used with dates. However, when I run these commands my output is different, I don't see the dates. The options --oneline
and --date=<relative or iso>
seem to be incompatible.
Result for git log --date=iso
:
Result for git log --date=iso --oneline
:
I tried this on three different computers with similar results.
Update:
The linked question asks "How to commit date". Perhaps they mean "How to show the commit date", but as it stands the question is not clear. Also, in the possible duplicate the OP asks about several options simultaneously. I am specifically asking how to show or print dates (author date or commit date) when using the oneline
option. The other OP is also concerned with the size of the commit history, which is also outside the scope of my question.
Perhaps the other question could be edited to match this question, but it didn't come up when I searched for this issue (although I didn't use the git-log
tag specifically, because I didn't notice that tag until I was searching for appropriate tags for my question).
Also, I know of no other effective way to show the results of printed formatting without using screenshots, especially because they have color. For what it's worth, the linked question also uses screenshots.
--oneline
format does not select any date formatting options, so the--date
setting for those format options has no effect. Use a different format, that has a date-formatting option in it. (Note:--oneline
is exactly the same as--pretty=oneline --abbrev-commit
.) – Sectarianismreflog
, which is fine for my purposes with a simplegit reflog --date=iso
... doh – Fistic