Skip to main content
Senior

A Healthy Family, or Multiple Parents

Senior

Task

Create the bugWork branch on commit C2, using only a relative path from main.

Graph hint

C2 is the parent of the second parent of the merge commit C6. To choose the parents of a merge commit, use the ^N form, and to keep moving up, use ^ or ~.

Requirements

  • Do not specify C2 directly.
  • The name of the new branch must be exactly bugWork.
  • You do not need to change the position of HEAD.

Expected result

The new bugWork branch must point to C2, and all other pointers must stay where they were.

What you will learn

After completing the task, you will be able to:

  • choose a specific parent of a merge commit;
  • combine ^, ^N and ~;
  • create a branch on a commit found by a relative expression.
Goal
localC0C1C2bugWorkC3C4C5C6C7HEAD main
Git trainer0 commands
terminal
localC0C1C2C3C4C5C6C7HEAD main