Skip to main content
Middle

The Index and git add

Middle

Task

Create one new commit on the current main branch.

Simulator note

This version of the exercise models only the commit graph. The state of files and the index is not checked, so it is enough to create a commit.

Expected result

main and the HEAD attached to it must move from C1 to the new commit.

What you will learn

After completing the task, you will be able to:

  • understand the place of a commit in the usual "changes → index → commit" cycle;
  • see how a commit advances the current branch;
  • take the limits of the simulator into account when working with the index.
Goal
localC0C1C2HEAD main
Git trainer0 commands
terminal
localC0C1HEAD main