Skip to main content
Junior

Relative Refs (^)

Junior

Task

Move to the first parent of the commit that the bugFix branch points to.

Requirements

  • Use a relative reference with ^ starting from the name of the bugFix branch.
  • Do not specify the C3 identifier directly.
  • Do not move existing branches.

Expected result

HEAD must end up directly on commit C3 in a detached state.

What you will learn

After completing the task, you will be able to:

  • use ^ to move to the first parent;
  • build relative references from branches;
  • move around the history without memorizing hashes.
Goal
localC0C1C2mainC3HEADC4bugFix
Git trainer0 commands
terminal
localC0C1C2mainC3C4HEAD bugFix