Skills › Scientific Agent Skills › markdown-mermaid-writing › git_graph.md
git_graph.md
79 lines · skills/markdown-mermaid-writing/references/diagrams/git_graph.md at 5f2bc03
1<!-- Source: https://github.com/SuperiorByteWorks-LLC/agent-project | License: Apache-2.0 | Author: Clayton Young / Superior Byte Works, LLC (Boreal Bytes) -->
3# Git Graph
5> **Back to [Style Guide](../mermaid_style_guide.md)** — Read the style guide first for emoji, color, and accessibility rules.
7**Syntax keyword:** `gitGraph`
8**Best for:** Branching strategies, merge workflows, release processes, git-flow visualization
9**When NOT to use:** General processes (use [Flowchart](flowchart.md)), project timelines (use [Gantt](gantt.md))
11---
<!-- Source: https://github.com/SuperiorByteWorks-LLC/agent-project | License: Apache-2.0 | Author: Clayton Young / Superior Byte Works, LLC (Boreal Bytes) -->
Git Graph
Back to Style Guide — Read the style guide first for emoji, color, and accessibility rules.
Syntax keyword: gitGraph Best for: Branching strategies, merge workflows, release processes, git-flow visualization When NOT to use: General processes (use Flowchart), project timelines (use Gantt)
Raw lines 1 to 12
13## Exemplar Diagram
15```mermaid
16gitGraph
17 accTitle: Trunk-Based Development Workflow
18 accDescr: Git history showing short-lived feature branches merging into main with release tags demonstrating trunk-based development
20 commit id: "init"
21 commit id: "setup CI"
23 branch feature/auth
24 checkout feature/auth
25 commit id: "add login"
26 commit id: "add tests"
28 checkout main
29 merge feature/auth id: "merge auth" tag: "v1.0"
31 commit id: "update deps"
33 branch feature/dashboard
34 checkout feature/dashboard
35 commit id: "add charts"
36 commit id: "add filters"
38 checkout main
39 merge feature/dashboard id: "merge dash"
41 commit id: "perf fixes" tag: "v1.1"
42```
44---
Exemplar Diagram
gitGraph
accTitle: Trunk-Based Development Workflow
accDescr: Git history showing short-lived feature branches merging into main with release tags demonstrating trunk-based development
commit id: "init"
commit id: "setup CI"
branch feature/auth
checkout feature/auth
commit id: "add login"
commit id: "add tests"
checkout main
merge feature/auth id: "merge auth" tag: "v1.0"
commit id: "update deps"
branch feature/dashboard
checkout feature/dashboard
commit id: "add charts"
commit id: "add filters"
checkout main
merge feature/dashboard id: "merge dash"
commit id: "perf fixes" tag: "v1.1"Raw lines 13 to 45
46## Tips
48- Use descriptive `id:` labels on commits
49- Add `tag:` for release versions
50- Branch names should match your actual convention (`feature/`, `fix/`, `release/`)
51- Show the **ideal** workflow — this is prescriptive, not descriptive
52- Use `type: HIGHLIGHT` on important merge commits
53- Keep to **10–15 commits** maximum for readability
55---
Tips
- Use descriptive
id:labels on commits - Add
tag:for release versions - Branch names should match your actual convention (
feature/,fix/,release/) - Show the ideal workflow — this is prescriptive, not descriptive
- Use
type: HIGHLIGHTon important merge commits - Keep to 10–15 commits maximum for readability
Raw lines 46 to 56
57## Template
59```mermaid
60gitGraph
61 accTitle: Your Title Here
62 accDescr: Describe the branching strategy and merge pattern
64 commit id: "initial"
65 commit id: "second commit"
67 branch feature/your-feature
68 checkout feature/your-feature
69 commit id: "feature work"
70 commit id: "add tests"
72 checkout main
73 merge feature/your-feature id: "merge feature" tag: "v1.0"
74```
Template
gitGraph
accTitle: Your Title Here
accDescr: Describe the branching strategy and merge pattern
commit id: "initial"
commit id: "second commit"
branch feature/your-feature
checkout feature/your-feature
commit id: "feature work"
commit id: "add tests"
checkout main
merge feature/your-feature id: "merge feature" tag: "v1.0"Raw lines 57 to 7677## Verified reference
79Syntax examples reviewed against [official Mermaid documentation](https://mermaid.js.org/syntax/gitgraph.html) and rendered with Mermaid 12.0.0 (2026-10-01). Check the destination version; appearance and accessibility are not guaranteed by a successful parse.
Verified reference
Syntax examples reviewed against official Mermaid documentation and rendered with Mermaid 12.0.0 (2026-10-01). Check the destination version; appearance and accessibility are not guaranteed by a successful parse.
Raw lines 77 to 79