🌿 Mermaid
Git graph
Explain branching strategies visually
What is a Git graph?
A git graph shows commits, branches, merges and tags. It is the clearest way to document your branching strategy — git flow, trunk-based, release trains — for the whole team.
Live example
gitGraph
commit id: "init"
branch develop
commit id: "setup CI"
branch feature/auth
commit id: "login page"
commit id: "JWT"
checkout develop
merge feature/auth tag: "v0.2.0"
checkout main
merge develop tag: "v1.0.0"When to use it
Document your team’s branching and release strategy
Onboard developers with visual git conventions
Explain hotfix and release procedures
Basic syntax
gitGraph
commit
branch develop
commit
checkout main
merge developQuestions about this diagram
Can I show tags and releases?
Yes — commits and merges accept a tag: attribute (e.g. tag: "v1.0.0"), perfect for documenting release points.
Which branching strategies can it represent?
Any: git flow, GitHub flow, trunk-based development, release branches — the syntax mirrors real git operations (branch, checkout, merge, cherry-pick).
Create your Git graph now
Describe it in plain language — the AI writes the Mermaid code for you.
Open Mermaid Studio