Tools / Editor

Git Branching Visualizer

Explain commits, branches and merges with an editable Git graph. Model operation order and preview the history without changing a repository.

Model the branch operations in order

Create a Git graph to explain a branching strategy or a small sequence of repository operations. Enter commits, branches, checkouts, and merges in order. The graph is a teaching and documentation model; it does not read or change a Git repository.

A worked example

Diagram source

---
config:
  gitGraph:
    mainBranchName: "main"
---
gitGraph
  commit id: "start"
  branch feature
  checkout feature
  commit id: "feature-work"
  checkout main
  merge feature tag: "v1.0"
A feature branch diverges from the main branch and is merged back. The graph shows the relationship between commits rather than their source-code contents.

How to use this tool

  1. Choose the main branch name and orientation. Start with a commit before branching.
  2. Add branch and checkout operations before commits that should belong on that branch.
  3. Return to the destination branch before a merge. Preview the graph and verify the branch labels and operation order.

What to check

DetailGuidance
Commit IDsUse distinct short IDs that readers can refer to. Labels in this tool are not verified repository hashes.
Cherry-pickUse an existing commit reference and inspect the resulting graph. A diagram cannot tell you whether a real cherry-pick would conflict.
Git behaviorThe preview follows the renderer’s supported gitGraph syntax. It is not a full Git execution engine.

Common questions

Can I import my entire repository history?

This builder is designed for a structured operation list. Reduce a complex history to the commits and branches relevant to the explanation; repository analytics and conflict detection require other tools.