Mermaid for
Git graphs
Draw branches, commits, and merges to explain a branching strategy, document a release process, or onboard contributors.
A Git graph is a diagram of a repository’s commit history: branches, commits, merges, and the order they happened in. Linus Torvalds created Git in 2005, and it is now the standard version control system in software development. Diagramming Git history helps teams agree on a branching strategy, review a release process, and onboard contributors without reading terminal output.
In Mermaid, you write a Git graph as a sequence of Git-style commands: commit, branch, checkout, merge, and cherry-pick. You can add commit IDs, tags, and commit types, and render the graph left to right or top to bottom. Mermaid draws the history you describe. It does not read from a live repository.
Describe your idea and get a diagram you can refine, then share with your team instantly.
Common questions about building Git graphs in Mermaid.