Pretty git branch graphs

前端 未结 30 2014
情话喂你
情话喂你 2020-11-22 01:34

I\'ve seen some books and articles have some really pretty looking graphs of git branches and commits. How can I make high-quality printable images of git history?

30条回答
  •  时光说笑
    2020-11-22 02:17

    Try ditaa. It can transform any ASCII diagram into an image. Although is was not designed with Git branches in mind, I was impressed by the results.

    Source (txt file):

            +--------+
            | hotfix |
            +---+----+
                |
    --*<---*<---*
           ^ 
           |
           \--*<---*
                   |
               +---+----+
               | master |
               +--------+
    

    Command:

    java -jar ditaa0_9.jar ascii-graph.txt
    

    Result:

    It also supports background colors, dashed lines, different shapes and more. See the examples.

提交回复
热议问题