What is the commit DAG, and how do parent pointers form the shape of your history?
Last updated
The commit DAG (Directed Acyclic Graph) models history: each commit points back to its parent(s), never to children, and no cycles are possible.
Parent count shapes history: zero parents is a root commit, one is a linear commit, and two or more is a merge commit.
Branches and tags are refs used as entry points for traversal. Merge base,
git log --graph, and rebase (which creates new commits with new parents) all follow from parent links.
- https://git-scm.com/docs/user-manual/2.46.0
- https://git-scm.com/docs/gitglossary
- https://dev.to/ganesh-kumar/from-commits-to-dags-how-git-uses-a-dag-to-track-your-code-history-1p1j
- https://github.blog/open-source/git/gits-database-internals-ii-commit-history-queries/
- https://gitperf.com/chapter-04.html
- https://medium.com/@a.kago1988/why-the-git-graph-is-a-directed-acyclic-graph-dag-f9052b95f97f
- https://writings.dipchakraborty.com/blog/series_git_how_works
- https://dev.to/tyson_cung/git-isnt-version-control-its-a-graph-database-52i2