Explaining DAG: Directed Acyclic Graphs As Utilized In Git and 4 types of git nodes (root, head, branch, merge)

The concern is to illustrate the basics of the concept of DAG (directed acyclic graph) foundational for any distributed version control system (i.e. git)

1. graph

  • graphs consist of nodes and edges lines joining those nodes together
  • there are more common types of graphs such as trees (hierarchical graphs) or lists (with nodes having up to 2 pointers)

2. directed graph

  • in a directed graph, edges have a defined direction
  • this is because there is a parent-child relationship going on here

3. acyclic directed graph

  • means that if you follow the direction, you can’t get to where you started
  • it is not a tree in that a node can have > 1 parent (the merge node see the merge node)
  • DAGs can get complex pretty quickly

4. types of nodes in git

5. links

--

--

Infrastructure Support Engineer/Technical Writer (snowplow.io) with a passion for Python/writing documentation. More about me: https://pavol.kutaj.com

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Pavol Kutaj

Infrastructure Support Engineer/Technical Writer (snowplow.io) with a passion for Python/writing documentation. More about me: https://pavol.kutaj.com