Integrations
GitHub sync
Push and pull Mermaid to a gist or repo file, with optional Auto-sync via the GitHub App (Pro/Team).
On this page4 sections
Overview
GitHub sync keeps a diagram’s Mermaid source linked to a gist or a single file in a repository. Manual push/pull always works. For repos, you can enable Auto-sync: SayDiagram pushes after you save, and pulls when GitHub receives a push webhook.
- Pro and Team only (including Team members with Pro quotas).
- Install the GitHub App for repo Auto-sync (Profile → Integrations).
- Connect GitHub OAuth for gists (and as a repo fallback).
- Link a diagram from Export → Sync with GitHub…
- Sync writes Mermaid text only (.mmd / .mermaid / .md) — not Arrange layout or PNG.
- Gists stay manual — Auto-sync is repo files only.
Install App and connect OAuth
- Open Profile → Integrations → GitHub sync.
- Install GitHub App on your user or org (Contents read/write).
- Optionally Connect GitHub OAuth for private gists.
- You can disconnect OAuth without unlinking your SayDiagram login.
Push, pull, and Auto-sync
- In the editor, open Export → Sync with GitHub…
- Choose Gist or Repo file (owner, repo, branch, path).
- Push uploads Mermaid source. Pull downloads remote source (version snapshot first).
- For repo links, enable Auto-sync to push ~8s after save and pull on GitHub push events.
Conflicts never force-overwrite. Auto-sync pauses and notifies you; resolve with Pull first / Overwrite, then Resume Auto-sync.
README tip
For GitHub READMEs, prefer a .md file with a fenced Mermaid block so GitHub renders the diagram:
```mermaid flowchart LR A[Idea] --> B[Arrange] B --> C[Ship] ```
Raw .mmd files stay as source in the repo; many tools and the SayDiagram IDE extension (VS Code, Cursor, Windsurf, VSCodium) open them directly.
Learn Mermaid · FAQ · Pricing · Dashboard