GitGraph Diagrams
What are GitGraph Diagrams?
Mermaid's GitGraph diagrams help you visualize Git workflows and branching strategies. For data teams, they're invaluable for documenting:
Feature development workflows
Release processes
Data pipeline versioning
Model deployment strategies
Hotfix procedures
Team collaboration patterns
Creating Your First GitGraph
Launch DinoAI: From Code IDE, access DinoAI to start creating diagrams.
Use a Simple Prompt: Tell DinoAI what kind of Git Graph Diagram you want to create. For example:
- "Create a mermaid GitGraph showing my feature branch workflow for data model development"
- "Generate a mermaid GitGraph diagram for my dbt™ release process with main, develop, and feature branches"
- "Build a mermaid Git workflow diagram showing my data team's branching strategy and merge process"
Get Your Diagram: DinoAI will generate a complete
.mmd
file with proper Mermaid syntax.Preview Your Work: Click the eye icon (👁️) to preview your diagram in real-time as you edit.
Iterate and Refine: Modify the generated
.mmd
file directly, or ask DinoAI to make specific changes.
Example:
---
title: Example Git diagram
---
gitGraph
commit
commit
branch develop
checkout develop
commit
commit
checkout main
merge develop
commit
commit

Reusable GitGraph prompts for you and your team
You can create custom, standardized .dinoprompts for Mermaid's GitGraff Diagrams that ensure consistency across your data team. See step-by-step guide.
Core Git Operations
Basic Commands
commit
: Add a new commit to current branchbranch
: Create and switch to a new branchcheckout
: Switch to an existing branchmerge
: Merge a branch into current branch
Commit Customization
gitGraph
commit # Regular commit
commit id: "abc123" # Custom ID
commit tag: "v1.0.0" # Add release tag
commit type: HIGHLIGHT # Highlight important commits
commit type: REVERSE # Indicate reverted commits
Branch Management
gitGraph
commit
branch feature/new-model # Create feature branch
checkout feature/new-model
commit
checkout main
merge feature/new-model # Merge feature
Common Data Team Workflows
Feature Development
gitGraph
commit id: "base_models"
branch feature/new-transformations
commit id: "add_staging"
commit id: "add_marts"
checkout main
merge feature/new-transformations tag: "v2.0.0"
Release Process
gitGraph
commit
branch develop
commit id: "new_metrics"
branch feature/reporting
commit
checkout develop
merge feature/reporting
checkout main
merge develop tag: "release-1.2.0"
Hotfix Workflow
gitGraph
commit tag: "prod"
branch hotfix/data-fix
commit id: "fix_null_values"
checkout main
merge hotfix/data-fix tag: "v1.0.1"
Advanced Features
Custom Commit Types
NORMAL
: Standard commit (default)REVERSE
: Reverted commitsHIGHLIGHT
: Important commits
Cherry-picking
gitGraph
commit id: "feat-1"
branch release
checkout main
commit id: "feat-2"
checkout release
cherry-pick id: "feat-2"
Orientation Options
Left to Right (default):
gitGraph LR:
Top to Bottom:
gitGraph TB:
Bottom to Top:
gitGraph BT:
Configuration Options
Visual Customization
%%{init: {
'gitGraph': {
'showBranches': true,
'showCommitLabel': true,
'mainBranchName': 'main'
}
}}%%
gitGraph
commit
branch develop
commit
Branch Ordering
Set main branch order:
mainBranchOrder
Custom branch order:
branch develop order: 2
Default ordering follows appearance in code
Best Practices
Use meaningful commit IDs and tags
Group related changes in feature branches
Mark significant releases with tags
Highlight important commits
Maintain clear branch naming conventions
Document merge strategies
Common Use Cases
Feature branch workflows
Release management
Hotfix procedures
Data pipeline versioning
Model deployment strategies
Team collaboration patterns
Additional Resources
For more syntax options and advanced features, visit the official Mermaid documentation
Last updated
Was this helpful?