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"How to use this tool
- Choose the main branch name and orientation. Start with a commit before branching.
- Add branch and checkout operations before commits that should belong on that branch.
- Return to the destination branch before a merge. Preview the graph and verify the branch labels and operation order.
What to check
| Detail | Guidance |
|---|---|
| Commit IDs | Use distinct short IDs that readers can refer to. Labels in this tool are not verified repository hashes. |
| Cherry-pick | Use an existing commit reference and inspect the resulting graph. A diagram cannot tell you whether a real cherry-pick would conflict. |
| Git behavior | The 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.