Skip to main content
Junior

Introduction to Git Commit

Junior

Task

You are on the main branch. Create two new commits in a row without switching to another branch.

Requirements

  • Make exactly two commits.
  • Do not create new branches and do not put HEAD into a detached state.

Expected result

The main branch must move forward by two commits, and HEAD must remain attached to main.

What you will learn

After completing the task, you will be able to:

  • create consecutive commits;
  • understand how a new commit refers to the previous one;
  • track how the pointer of the current branch moves.
Goal
localC0C1C2C3HEAD main
Git trainer0 commands
terminal
localC0C1HEAD main