Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updates to Git-Graph-Structure-and-Branching #5

Open
StoneyJackson opened this issue Apr 1, 2019 · 0 comments
Open

Updates to Git-Graph-Structure-and-Branching #5

StoneyJackson opened this issue Apr 1, 2019 · 0 comments

Comments

@StoneyJackson
Copy link
Owner

StoneyJackson commented Apr 1, 2019

https://github.com/StoneyJackson/CollabDev/tree/master/Activities/Git-Graph-Structure-and-Branching

  • 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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant