Skip to main content
Junior

Branching in Git

Junior

Task

Create a new branch bugFix from the current commit of the main branch and switch to it right away.

Requirements

  • The branch name must be exactly bugFix.
  • You do not need to create new commits.

Expected result

The main and bugFix branches must point to the same original commit, and HEAD must point to the bugFix branch.

What you will learn

After completing the task, you will be able to:

  • create a branch from the current commit;
  • switch between branches;
  • tell creating a branch apart from switching to it.
Goal
localC0C1main HEAD bugFix
Git trainer0 commands
terminal
localC0C1HEAD main