The git reflog command (or git log -g) can use a custom "pretty format". A ton of things are customizable in the pretty format. But although the reflog designator %gd can take two formats, it doesn't seem like there is any way to specify which format you want.
The two formats are:
- "index format" e.g.
HEAD@{2} - "timestamp format" e.g. `HEAD@{2024-02-05 Mon 16:00:41 -0800}
But the rules for choosing which format are not based on the "pretty format", and there is no special %gd designator to that means "reflog selector in index format" or "reflog selector in timestamp format". So it looks like it's impossible to see BOTH together in the same output.
Here's what I'm trying to do. I want a pretty format that includes the commit date, the reflog selector in index format, and the timestamp of the reflog entry (when it was that I switched branches). The reflog selector in timestamp format would meet that last criterion. But once you meet the criteria for showing reflog selector in timestamp format (e.g. by using the --date option), you can no longer get the reflog selector in index format.
Am I missing anything? I'll file a feature request unless somebody knows an undocumented way to do this.
Reference: the rules for choosing which reflog designator format gets displayed git-log man page in the section for --walk-reflogs.