Skip to content

Commit graph is visually misleading near branch tips (branch divergence unclear) #5497

@zhfwch

Description

@zhfwch

Description

The commit graph in lazygit can be visually misleading near branch tips, especially when multiple branches are present.

While the underlying commit DAG is correct, the combination of column reuse and branch label placement can make it appear as if a branch diverged from an incorrect commit.

This is confusing when trying to understand where a branch was created.


Example

In my case:

  • bugfix/logger was created from main at commit 3b69e3cc
  • However, in lazygit, the graph visually suggests that it might have diverged from a much older commit (due to a continuous vertical line)

The lower part of the graph is correct and easy to read, but near the branch tip the visualization becomes misleading.

Image Image

Expected behavior

The graph should make branch divergence clearer, or at least avoid visual artifacts that suggest incorrect ancestry.

Possible improvements:

  • Make branch divergence points more explicit
  • Avoid column reuse near branch tips when it causes ambiguity
  • Provide an optional "branch-aware" graph mode (similar to GitHub/Fork)

Actual behavior

  • Commit relationships are correct
  • But visually, the branch appears to be connected to the wrong ancestor due to column reuse

Screenshots

(attach your lazygit screenshot here)


Additional context

This seems related to how the graph layout prioritizes compactness over clarity.

Similar confusion has been reported in issues like:


Thanks for the great tool! This is just a UX improvement suggestion.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions