2

I am trying to draw git diagrams with mermaid, using flowchart as an alternative to mermaid gitgraph-diagrams. The main reason is to show the branches and HEAD pointers on the graph. As example:

    flowchart RL;
      3((9817e0))-->1((e137e9));
      4((ae3e0f))-->3;
      id2(main) -.-> idHead
      id1(HEAD) -.-> id2(main)
      idHead((e2d9e6))-->6;
      idHead-->4;
      5((a1fbcd))-->3;
      52((86d91f))--> 5
      6((711a58))-->52;
      id3(dev) -.-> 6
    
      style id1 fill:#b8dbbc,stroke:#333,stroke-width:1px
      style id2 fill:#f96,stroke:#333,stroke-width:1px
      style id3 fill:#f90,stroke:#333,stroke-width:1px
      style idHead fill:#b8dbbc

enter image description here

Is there a way to draw the pointers "main", "dev", HEAD, on top or down the nodes, not in the same line? The desired result would be like this:

enter image description here

Thanks.

Joaquín
  • 106
  • 1
  • 7

0 Answers0