Mermaid Online
Templates/Documentation/Git Branching Workflow
Git Graph template · local export

Git Branching Workflow Mermaid Template

Git graph for feature branches, review, release branch, hotfix, and production tag. Edit the code below, choose a publish preset, then export without signup, watermark, or cloud upload.

Gitreleaseworkflow
Paste or edit Mermaid code
Replace the sample below, or load another example.
Load example
Preparing the local renderer without uploading your diagram.Preparing editor…
Live previewSample preview · Clean Docs

Write

Preview

Export

Docs Asset

Preparing local editor…
Render & export

Export controls activate after your diagram renders locally.

Git Graph
Mode
Default renderNative MermaidOptimized exportStyled download
Export style
Clean DocsGitHub READMETransparent DocsWarm Editorial✦ ProWhiteboard Sketch✦ ProAurora Noir✦ ProBlueprint✦ ProChampagne✦ ProEmerald Suite✦ ProEditorial✦ Pro
Scale
1x2x4x
Or exact width, e.g. 1200px wide
Output: White · comfortable padding
Size: calculated after render
Filename: mermaid-git-graph-white-2x.png

When to use the Git Branching Workflow template

A Git graph of a release workflow: feature work happens on feature/auth with named commits, merges back to main, a release/v1 branch carries the release candidate, and the merge is tagged v1.0. When a patch is needed, a hotfix branch forks, carries the patch commit, and merges back with the v1.0.1 tag.

Template code

The full Mermaid source for this template — copy it into any Mermaid-compatible tool, or edit and export it in the editor above.

gitGraph
  commit id: "main"
  branch feature/auth
  checkout feature/auth
  commit id: "login"
  commit id: "tests"
  checkout main
  merge feature/auth
  branch release/v1
  checkout release/v1
  commit id: "rc"
  checkout main
  merge release/v1 tag: "v1.0"
  branch hotfix
  checkout hotfix
  commit id: "patch"
  checkout main
  merge hotfix tag: "v1.0.1"

How to customize this template

Related guides