lazygit icon indicating copy to clipboard operation
lazygit copied to clipboard

Branch Visualization

Open WinnerWind opened this issue 6 months ago • 2 comments

Is your feature request related to a problem? Please describe.

I have a lot of branches in my project. Some of these branches are sub branches of other branches. So, for example, a minimized version of my project looks like

                                                mobile-branding
                            fix-ascii-rendering/
             fix-mobile ---/                   \   (pr merged)
master -----<-----------------------------------------
             branding ----/   (pr merged)
                          

But lazygit shows the branches like

master
fix-mobile
fix-ascii-rendering
branding
mobile-branding

Which is inconvenient.

Describe the solution you'd like

Like the commits panel, it would be nice if Lazygit offered some sort of visualization of how the branches are diverging. Perhaps this could be included in the name itself. Something like

master
master/fix-mobile
fix-mobile/fix-ascii-rendering
master/branding
fix-ascii-rendering/mobile-branding

would already be so much easier on my eyes. For a more concice notation, a tree could be used.

master
L fix-mobile
 L fix-ascii-rendering
  L mobile-branding
L branding

Describe alternatives you've considered

N/A. I just try to keep track in my head.

Additional context

When I used GIT via CLI, I used to use this command to create a visualization of sorts, but this is a log of commits and not branches. git log --graph --abbrev-commit --decorate --format=format:'%C(bold blue)%h%C(reset) - %C(bold green)(%ar)%C(reset) %C(white)%s%C(reset) %C(dim white)- %an%C(reset)%C(auto)%d%C(reset)'

WinnerWind avatar Aug 24 '25 17:08 WinnerWind

I think solving #4991 can also solve (in a way) this current issue.

raminudelman avatar Oct 27 '25 17:10 raminudelman

My workaround is to focus the Commits panel with 4, enlarge (to include branch names) with + and toggle whole graph with c-l Enter.

But I would also love a more concise visualization that skips commits between diverge/merge points.

arildm avatar Dec 02 '25 12:12 arildm