Git Graph

Free Online Git Graph Visualizer

Visualize git branches, commits, and merges with Mermaid. Perfect for documentation, README files, and team onboarding.

Try it live

gitGraph
   commit id: "project init"
   commit id: "add README"

   branch develop
   checkout develop
   commit id: "scaffold app"
   commit id: "add routing"

   branch feature/auth
   checkout feature/auth
   commit id: "login page"
   commit id: "JWT handler"
   commit id: "tests"

   checkout develop
   merge feature/auth id: "merge auth"

   branch feature/dashboard
   checkout feature/dashboard
   commit id: "dashboard UI"

   checkout develop
   merge feature/dashboard

   checkout main
   merge develop tag: "v1.0.0"

When to use git graph

README documentation

Show your branching strategy visually in your project README on GitHub or GitLab.

Team onboarding

Explain git workflows like Gitflow, trunk-based development, or feature branch strategies.

Release planning

Visualize upcoming merges, release branches, and hotfix flows for your team.

Key syntax

gitGraphDeclare diagram type
commit id: "label"Add a commit with a label
branch nameCreate a new branch
checkout nameSwitch to a branch
merge nameMerge a branch into current
tag: "v1.0"Add a tag to a commit
type: HIGHLIGHTHighlight a commit visually

How to create a git graph with Mermaid

1

Open FlowViz and type gitGraph.

2

Add commits to the main branch: commit id: "initial commit".

3

Create a feature branch: branch feature/my-feature.

4

Switch to it: checkout feature/my-feature.

5

Add commits on the feature branch.

6

Switch back: checkout main.

7

Merge the branch: merge feature/my-feature.

8

Add version tags with tag: "v1.0.0" on a commit.

Start diagramming now

No signup. No install. Just open the editor and start writing.