You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Shouldn't the arrows between commits be pointing in the opposite direction? i.e., The arrow from the first commit should point to the 2nd commit. The 2nd commit should merge to the 3rd.
And during a merge, the arrow should point from the source branch to the target branch.
Or am I completely misunderstanding something?
The text was updated successfully, but these errors were encountered:
@lorengphd that's a common issue that people have when trying to understand how git works. The direction of the arrows has to do with how the commits are linked together. Each commit in git points to the commit that preceded it (it can point to more than one, in the case of a merge commit). That information is available to the new commit when it's being created, but not to the older commit. (That would require knowing the future!)
Of course, git could simply edit the parent commit to point to the child commit, but the entire point of commits is that they're immutable. So the only way to link them is from child to parent, not the other way around.
Hope that helps! Let me know if anything is unclear.
Shouldn't the arrows between commits be pointing in the opposite direction? i.e., The arrow from the first commit should point to the 2nd commit. The 2nd commit should merge to the 3rd.
And during a merge, the arrow should point from the source branch to the target branch.
Or am I completely misunderstanding something?
The text was updated successfully, but these errors were encountered: