explain-git-with-d3
explain-git-with-d3 copied to clipboard
Show visually that HEAD points to a branch, not usually a commit
This would make the git checkout example clearer, when you git checkout bb92e0e like it suggests. Right now the only difference from git checkout master is the “Current Branch” text at the top left of the visualization, which is easily missed.
This would also make the git checkout -b example clearer. If you git checkout -b foo and git checkout -b bar, it looks like HEAD is just another branch, but colored green because it’s the most important.
It could look something like this:
Current Branch: master
╭────╮
--│ │
╰────╯
bb92e0e…
[master] ← [HEAD]
[tested]
Current Branch: detached HEAD
╭────╮
--│ │
╰────╯ ↖︎
bb92e0e… [HEAD]
[master]
[tested]