Losing Your Head, or Detached HEAD
Task
HEAD is currently attached to the bugFix branch, which points to commit C4. Switch directly to commit C4.
Requirements
- Put
HEADinto a detached state. - Do not move the
mainandbugFixbranches.
Expected result
HEAD must point directly to C4, and the bugFix branch must still point to the same commit.
What you will learn
After completing the task, you will be able to:
- tell a
HEADattached to a branch apart from a detachedHEAD; - check out a specific commit;
- understand why such a checkout does not move a branch.
Goal
local