#6010·lazygit

Show relative commit age in the compact commits view

Author: iliferovCreated Sep 10, 2026Updated Sep 10, 2026
Labelsenhancement

Is your feature request related to a problem? Please describe

I usually keep the commits panel in normal/compact screen mode. It shows the commit hash, author, graph, and subject, but not when each commit was created.

The timestamp becomes visible after enlarging the panel with +, but this changes the layout and shows an absolute date or time. I would like to see the relative age while keeping the compact one-line layout, especially when scanning recent commits.

Describe the solution you'd like

Add an optional relative-age column to commit rows in the compact view:

82c03593  4m  IL  ○─ Merge pull request...
059c9ca0  2h  IL  ○  Leave the pause...
ece5ac1a  3d  IL  ○  Merge pull request...

Using the same short representation as the branches panel (4m, 2h, 3d) would keep the column narrow and make the two panels consistent.

This could be exposed as either:

  • a toggle in the commits Log menu, with the choice persisted; or
  • an opt-in configuration setting such as showCommitAgeInCompactView.

The existing compact layout should remain the default.

Current implementation

The required data and formatter already appear to exist:

  • Commits contain UnixTimestamp.

  • utils.UnixToTimeAgo(timestamp) in pkg/utils/date.go converts a Unix timestamp into the compact s, m, h, d, w, M, or y format.

  • pkg/commands/git_commands/branch_loader.go uses UnixToTimeAgo when populating Branch.Recency, which is rendered as the first column in the branches panel.

  • Stash entries use the same formatter.

  • In pkg/gui/presentation/commits.go, displayCommit already has access to commit.UnixTimestamp. However, its date column is populated only when fullDescription is true:

    descriptionString := ""
    if fullDescription {
        descriptionString = style.FgBlue.Sprint(
            utils.UnixToDateSmart(
                now,
                commit.UnixTimestamp,
                timeFormat,
                shortTimeFormat,
            ),
        )
    }
    
  • fullDescription is passed by the commits context when the screen mode is not SCREEN_NORMAL, which explains why the timestamp appears after pressing + but not in the normal compact view.

A possible implementation would therefore reuse UnixToTimeAgo for the description column when compact relative ages are enabled, without requiring another Git command or additional commit data.

Relevant files:

  • pkg/utils/date.go
  • pkg/commands/git_commands/branch_loader.go
  • pkg/gui/presentation/branches.go
  • pkg/gui/presentation/commits.go
  • pkg/gui/context/local_commits_context.go

Describe alternatives you've considered

  • Enlarging the commits panel with +. This shows a timestamp, but changes the layout and uses timeFormat / shortTimeFormat rather than relative age.
  • Customizing branchLogCmd. It can display %cr, but only changes the branch log in the main panel and does not affect the interactive commits list.
  • Opening a separate git log or tig view. This loses the integrated lazygit commit workflow.

Additional context

PR #5846 proposes normal, comfortable, and spacious commit display formats, with author and date on a second line in the latter two modes:

https://github.com/jesseduffield/lazygit/pull/5846

That proposal is related, but this request is specifically about showing a small relative-age column in the existing one-line compact layout.