If you want to see more comics like this, sign up for my saturday comics newsletter or browse more comics!
read the transcript!
HEAD is a tiny file containing the name of the current branch
Diagram of three boxes in a row, joined by lines. One has a heart, one has a star, and one has a squiggle. The final one, with the squiggle, is labelled “main
”.
HEAD
= main
main
= [squiggle]
when you commit, git updates the current branch to point at the new commit
Diagram of three boxes in a row, joined by lines. One has a heart, one has a star, and one has a squiggle. The final one, with the squiggle, is labelled “main
”.
HEAD
= main
main
= [squiggle]
Diagram of four boxes in a row, joined by lines. One has a heart, one has a star, one has a squiggle, and one has a spiral. The final one, with the spiral, is labelled “main
”.
HEAD
= main
main
= [spiral]
SO MANY things in git use the current branch
git commit
moves it forwardgit merge
merges into itgit rebase
copies commits from itgit push
andgit pull
sync it with a remote
many git disasters are caused by accidentally running a command while on the wrong branch
Illustration of a sad stick figure
person: git commit
person, thinking: UGH I didn’t mean to do that on main
I keep my current branch in my shell prompt
~/work/homepage (main) $
to me it’s as important as knowing what directory I’m in
panel 6
Illustration of a smiling stick figure with curly hair.
person: I think HEAD
is a weird name for the current branch (why not CURRENT
or something?) but we’re stuck with it
Saturday Morning Comics!
Want another comic like this in your email every Saturday? Sign up here!