A teaching picture of commits and merges
A Git graph draws commits, branches, and merges so someone can learn a branching story. You describe the story. The picture is not a dump of a real repository.
A flowchart is the neighbor when you want decisions in a process. Use a Git graph when the objects are commits on branches, and a merge is the point of the picture.
Illustrate a policy, not a log
Use this page to teach a habit, such as a feature branch that merges back to main after review. Do not paste a real log. Choose a flowchart if the lesson is a procedure with yes and no, and the commits are incidental.
Keep the story short
1. Name the branches first
Say main and the feature branch before you list commits. If the draft invents extra branches, delete them.
2. Show one merge clearly
Mark which commit joins which branch. A picture with branches that never meet fails the lesson.
3. Limit the commit count
Three to six commits are enough for teaching. Collapse noisy fix commits into one message in the prompt.
How to phrase the prompt
Tell the story in time. Start on main, open a branch, add the commits that matter, then merge or keep the branch open. Use plain messages a student would recognize. Do not include hashes from a real repo.
Git graph questions
- Will this read my repository?
- No. You describe the commits and branches you want to teach. The draft does not inspect a remote project.
- How do I show two features at once?
- Name both branches and the order they merge. If the picture gets tangled, split the second feature into a second diagram.
- The draft looks like a flowchart. What should I change?
- Put Git graph in the first line and use the words commit, branch, and merge. Remove decision language such as if approved.