# The easiest way to draw git graphs

I find it easier to discuss branching and release strategies for git repositories with visual aid. Here is an example of a git graph:

![branching.png](https://cdn.hashnode.com/res/hashnode/image/upload/v1612566431394/s3UUME2Hq.png)

You might think that looks really complex! How difficult is it to draw such graphs?!?

If you know JavaScript a bit (don't worry, you don't have to be an expert) then its quite easy thanks to [GitGraph.js](https://gitgraphjs.com/#0). This JavaScript library does all the heavy lifting and enables you to *programmatically* define the git graph which then gets rendered in the browser by the library.

I really dig their online documentation in form of a slide show.

![gitgraphjs.gif](https://cdn.hashnode.com/res/hashnode/image/upload/v1612567088309/W2D7smSuy.gif)

%[https://gitgraphjs.com]

My tip: use CodePen or any alternative online editor (which supports HTML/JS/CSS) to get started quickly. No unnecessary download of GitGraphJS as you can specify the use as an external script.

%[https://codepen.io/MarcoEidinger/pen/bGVbKgo]

If you like this then please leave a star on this open-source project.

%[https://github.com/nicoespeon/gitgraph.js/]




