← All updates

GitGraph branch labels keep to their own lane

In a Mermaid gitGraph, branch names on neighbouring lanes no longer run together — each label now runs along its own lane, reading bottom-to-top.

mermaidmarkdowndiagrams

A gitGraph draws each branch as a vertical lane and names it at the top. The names were drawn horizontally, so any branch name wider than a lane ran into its neighbour's: on our own sample main and develop touched and read as the single label "main develop", and longer names collided even more.

Each branch name now runs along its own lane, rotated to read bottom-to-top the way Mermaid itself draws them. A rotated label is only one line of text wide, so neighbouring lanes can never collide however long a branch name is — feature/checkout-redesign is as legible as dev.

The diagram's top margin grows to fit the labels, and each label stops above the first commit's circle and any tag badge on it, so a label can no longer touch the graph. Branches that share a lane (possible with an explicit order:) stack their labels instead of overprinting them.

Existing diagrams need no changes: re-render them and the branch names appear along their lanes.