Gitgraph Diagrams
Overviewβ
A Git graph shows git commits and actions (commands) across different branches. This type of diagram helps developers and DevOps teams share and understand their Git branching strategies, making workflows like git flow easier to visualize.
Codeβ
---
title: Example Git diagram
---
gitGraph
commit
commit
branch develop
checkout develop
commit
commit
checkout main
merge develop
commit
commit
Exampleβ
Atlassian Use Casesβ
In Confluence: Use Git diagrams in engineering wikis, onboarding guides, or branching strategy documentation to visually explain how your team uses Git (e.g., Git Flow, trunk-based development).
In Jira: Attach a Git diagram to an Epic or feature issue to document the expected branching and merge strategy for a release.
Example: Git Flow branching strategyβ
gitGraph
commit tag: "v1.0"
branch develop
checkout develop
commit
branch feature/login
checkout feature/login
commit
commit
checkout develop
merge feature/login
checkout main
merge develop tag: "v1.1"
Full Syntax Referenceβ
For the complete Mermaid gitgraph syntax, see the official Mermaid documentation.