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
Present commit nodes in the same order as git log, most resent first. This will reduce the cognitive load when trying to match the commits in the log and the diagrams.
Point HEAD to the branch and not the commit, unless it has been checked out to a commit. When a branch is checked out, HEAD is attached to the branch. In this state, the branch that is checked out is the active branch, and when a commit is made, the branch is advanced, and HEAD is implicitly advance by virtue of being attached to the branch. If a commit is ever checked out, HEAD then points to that commit, and we are in a "detached HEAD" state. This refers to HEAD not being attached to a branch. When a commit is made, HEAD is advanced, but no branch is advanced.
Remove the asterisk? This is a notation used by git branch to show which branch is active. The active branch is the branch that HEAD points to. So this is redundant information in the diagrams. However, if the point of the diagram is to teach about asterisk, then it should stay.
I would prefer to use git branch <name> and not git branch <name> <commit> for creating a commit. I feel the former is more common, and the latter is not necessary. For example to create a new branch for v1.0: I prefer git checkout v1.0 ; git branch bug-fix ; git checkout bug-fix over git branch bug-fix v1.0 ; git checkout bug-fix. Even though the former is longer and leads to a detached head state the number of commands needed to learn are fewer overall (I consider commands with different number of parameters a separate command).
In diagrams, make a visual distinction between a branch and a tag.
The text was updated successfully, but these errors were encountered:
https://github.com/StoneyJackson/CollabDev/tree/master/Activities/Git-Graph-Structure-and-Branching
git log
, most resent first. This will reduce the cognitive load when trying to match the commits in the log and the diagrams.git branch
to show which branch is active. The active branch is the branch that HEAD points to. So this is redundant information in the diagrams. However, if the point of the diagram is to teach about asterisk, then it should stay.git branch <name>
and notgit branch <name> <commit>
for creating a commit. I feel the former is more common, and the latter is not necessary. For example to create a new branch for v1.0: I prefergit checkout v1.0 ; git branch bug-fix ; git checkout bug-fix
overgit branch bug-fix v1.0 ; git checkout bug-fix
. Even though the former is longer and leads to a detached head state the number of commands needed to learn are fewer overall (I consider commands with different number of parameters a separate command).The text was updated successfully, but these errors were encountered: