(no title)
mtnygard | 2 years ago
A commit points to it's parent(s). Since a branch is just a commit ID, you can follow the parent links backwards to find the whole history of that branch.
So a "branch point" is just where two chains of parent links converge.
The special part are merge commits. Those have multiple parents, indicating that two histories fused into one.
layer8|2 years ago
If, for example, you have a structure like
then conceptually the path CA might be one branch and DB the other branch (or alternatively, CB and DA). But this is not something that is represented in Git’s model.ajross|2 years ago
Uh... yes it can. Commits have a list of 0 or more parents. That creates a DAG. There are literal hordes of tools out there that reliably interpret this, from visualizer tools to practical mutators like git bisect.
Maybe you're trying to say that no single commit order exists that traverses the whole tree. That's true, because branches can merge together. But it remains a completely interpretable graph nonetheless.
vifon|2 years ago
Izkata|2 years ago
lifeisstillgood|2 years ago
mountainboy|2 years ago
unknown|2 years ago
[deleted]
trealira|2 years ago
learngitbranching.js.org/
Which represents commits as circles with arrows pointing to their parents.