The Merge Log

What

A merge commit alters the visual graph of your repository. You can use specialized git log options to output a graphical ASCII representation showing exactly how branches split, ran in parallel, and merged back together.

How

To view parent lists and the branch connection visual graph, use the --graph and --parents flags in your log query:

# View the ASCII timeline and parent hashes
git log --oneline --decorate --graph --parents

Example output:

*   89629a9 d234104 b8dfd64 (HEAD -> main) Merge branch 'feature'
|\
| * b8dfd64 fba0999 (feature) D: add feature elements
* | d234104 fba0999 E: update index files
|/
* fba0999 1381199 C: add initial structures

In the log output above:

  • 89629a9 is the merge commit itself. The two subsequent hashes (d234104 and b8dfd64) represent its two distinct parent commits.
  • The path characters |\ and |/ visually outline the split and reunion of parallel branch paths.
  • fba0999 is the common ancestor commit where both paths originally diverged.

Why

When debugging complex projects, you often need to trace which branch a bug was introduced on. Understanding how to read the ASCII graph and identifying the dual parents of merge commits lets you map out the chronological flow of features, helping you isolate bugs or audit parallel team workflows easily.

Summary

Use git log --graph --parents to output an ASCII branch map that displays parent lists, showing exactly how branch timelines split and reunited.