How can I read Git history as a graph of branches and merges?
Quick answer
Run git log --graph --oneline --decorate in your repository. The graph draws parent relationships, each one-line entry represents a commit, and decorations show reference names such as branch names. A merge commit has multiple parents, so the graph shows history joining lines. Treat the display as ancestry and ordering, not an exact timeline of when events happened. Add local branch names to inspect specific branches. [S1]
The question, the details, the next step.
A practical checklist
Run
git log --graph --oneline --decoratefrom the repository.Read each abbreviated hash and message as a commit entry; treat parentheses as reference labels.
Follow connector lines to see parent relationships and where a multi-parent merge joins history.
Add local branch names as revisions when you want to inspect their reachable history.
Use commit messages as hints, not proof of what changed or when events happened.
A few more useful answers
Does the graph show every branch in my repository?
It shows history reachable from the revision or revisions selected for the log. Name local branches explicitly when you want to inspect them. [S1]
Does a merge graph prove which changes were reviewed or accepted?
No. It visualizes commit ancestry and parent relationships, not the review process or the meaning of the changes. Inspect the relevant commits if you need to understand their contents.
Are commits higher in the output always newer in real time?
The display shows commit ancestry and ordering, but it is not a guarantee of exact wall-clock sequence. [S1]
Sources
References used for this guide.
- [S1] Git - git-log Documentation git-scm.com · Checked
