Winner's Excogitations

A chronicle of the thoughts, learning experiences, ideas and actions of a tech junkie, .NET, JS and Mobile dev, aspiring entrepreneur, devout Christian and travel enthusiast.

What the Git HEAD is

7 years ago · 1 minute read

bolorundurowb_com/production/article/hbyf3ey0vezmpnhotx2h

In my crash course introduction to Git and all its terminologies and commands, no term was as confusing as the word ‘HEAD’. Different people had apparently differing opinions of what the term meant which didn’t help with my conundrum.

One day and a gazillion webpages later, I have a more holistic understanding of what the HEAD means. I’ll state that the differing opinions mentioned were correct but not complete.

So lets get to it. What is the HEAD?

  1. In most cases, the HEAD refers to or points to the latest commit in the current branch that you are working on. For example, if you are on the master branch, the HEAD is the latest commit in the master branch, if you switch to a feature-branch, the HEAD switches to the latest commit in the feature-branch.
  2. In other rarer cases, the HEAD refers to or points to a particular commit or tag and is called a detached HEAD.

I hope this was informative.

Cheers!

Share on:
[HOW TO] Working with vCardLib
A now obsolete tutorial on making use of the vCardLib authored by yours truly.
Chronicles of My Andela Bootcamp Days: Intro
An introduction to my Andela bootcamp experience
Winner-Timothy Bolorunduro
Winner-Timothy Bolorunduro is a senior .NET developer with over 6 years experience helping organizations and individuals build compelling, stable and scalable web applications. Having spent the last three years in a fast-paced startup environment working remotely, he understands what goes into being part of a team that produces value for clients.

Comments