And on that note, in my personal experience, commits and branching become much easier to understand and visualize once you think of your commit history as a linked list, and HEAD as a pointer that you can position at will.
In fact, this is hinted at in the syntax of git log: HEAD -> master, where HEAD is quite literally pointing to master (assuming that's where we are atm).
Also, I agree: We shouldn't make things simpler for beginners, even if it means they may initially be confused. It's part of the learning process!
"head is the most recent commit of the repository you work with."
Even if it's for beginner and you need simplification. It's far from what HEAD really is.
Maybe you can forget what it is for beginners or you can just say "It's where you are currently". ;)
Yup!
And on that note, in my personal experience, commits and branching become much easier to understand and visualize once you think of your commit history as a linked list, and
HEAD
as a pointer that you can position at will.In fact, this is hinted at in the syntax of
git log
:HEAD -> master
, where HEAD is quite literally pointing to master (assuming that's where we are atm).Also, I agree: We shouldn't make things simpler for beginners, even if it means they may initially be confused. It's part of the learning process!
IMHO the best way to demystify what HEAD is, is to go inside the .git folder.
After that you go to the refs folder and you can explain the branches ;)
Personally I understood many things by watching inside this .git folder.
I didn't mention that, but your article is nice. I will send it to my students :)