Skip to main content
Junior

Relative Refs #2

Junior

Task

Rearrange the existing pointers to the given commits.

Requirements

  • Force-move main to C6.
  • Move HEAD from C2 to its parent C1, keeping the detached state.
  • Force-move bugFix to C0.
  • Use relative references for moving backward.

Expected result

main must point to C6, bugFix to C0, and the detached HEAD to C1. You do not need to create new commits.

What you will learn

After completing the task, you will be able to:

  • force-move branches;
  • use HEAD~N references;
  • manage the positions of branches and HEAD independently.
Goal
localC0bugFixC1HEADC2C3C4C5C6main
Git trainer0 commands
terminal
localC0C1C2HEADC3C4mainC5bugFixC6