HEAD Reference
Multiple Choice Medium
Question
What does HEAD refer to in Git?
Hint
HEAD points to the current position.
Explanation
HEAD is a pointer to the current commit (or the current branch, which points to a commit). When you make a new commit, HEAD moves to the new commit. git checkout <commit> puts HEAD in "detached HEAD" state. HEAD~1 refers to the commit before HEAD. HEAD is used in many Git commands like reset, diff, and log.
Related Resources
Related Lessons
- What is Git
Learn Git basics.
Look up unfamiliar terms
A beginner-friendly glossary explains jargon in plain English — variables, functions, DOM, Promise, and more.
Decode error messages
Plain-English explanations of common errors — what they mean, why they happen, and how to fix them.
Build real projects
Apply what you learned by building guided projects with starter code and solutions.