gitGraphv0.9.4

Git グラフとは?

ブランチ、マージ、タグ ― リポジトリそのまま。

gitGraphmainfeat/i18nfeat/seo
使いどころ

Use a Git グラフ when…

01

Branching strategy explainers

02

Onboarding new contributors

03

Documenting a release process

構文の基本

The minimal syntax

Copy this and you have a working git グラフ. Build from here.

gitgraph.mmd
gitGraph
    commit
    commit
    branch feat/i18n
    commit
    commit
    checkout main
    merge feat/i18n
    branch feat/seo
    commit
    commit
    checkout main
    merge feat/seo
mainfeat/i18nfeat/seo
よく使うパターン

Patterns worth memorizing

Tags

`commit tag: "v1.0.0"` adds a label to a commit dot.

Cherry-pick

`cherry-pick id: "<hash>"` reproduces a commit on the current branch.

showCommitId

Set `showCommitId: false` in init to hide the auto-generated short SHAs.

ハマりどころ

The things that will trip you up

Mermaid silently ignores misspellings — these are the failures we see most.

  1. 01

    Branch order in the legend follows declaration order, not visual order.

  2. 02

    You must `checkout` before committing on a branch — there is no implicit current branch.

  3. 03

    Mainline rebase isn't modeled; document linear history with `commit` instead.