The DAG - Your Project's Family Tree
Graph TopologyParallel work creates diverging history. The merge commit has two parent pointers.
Core Git 2/8
Git history is a directed acyclic graph (DAG). Each commit has its own hash and stores references to a tree snapshot plus parent commit(s), always pointing backward.
Back to Git Concepts overviewParallel work creates diverging history. The merge commit has two parent pointers.
In a Git DAG, the D means directed: every arrow has a direction and points from a commit to older ancestor commit(s). The family tree view shows the same idea in a more familiar way.
In a Git DAG, the A means acyclic: commit ancestry cannot loop back on itself. In the diagram, `C3 -> C2 -> C1` is valid, but `C3 -> C1` coming back around to create a cycle is not allowed.
In a Git DAG, the G means graph: commits are nodes, and parent relationships are edges connecting them. This is the same visual structure as the family-tree example above, just applied to Git history instead of people.