0

This question elucidates that git commits form a DAG, not necessarily a tree. A DAG that is not a tree results from a merge commit, which will have multiple parents.

Is it fair to say that when Git is allowed to fast-forward, the resulting structure will be a DAG that is equal to its own transitive reduction?

For example:

master   develop
  |         |
  v         v
  A <- B <- C

If you had master checked out and ran git merge develop, git would recognize that there's already a path from A to C and would not create a new one (aka a merge commit)—unless you force it to with --no-ff.

LastStar007
  • 725
  • 1
  • 8
  • 21

0 Answers0