Skip to main content
Middle

git restore

Middle

Task

Create one new commit on the current main branch.

Simulator note

The working directory and file restoration are not modeled in this exercise. Only the appearance of a new commit in the graph is checked.

Expected result

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

What you will learn

After completing the task, you will be able to:

  • separate operations on working files from operations on history;
  • understand that restore alone does not create a commit;
  • track how the graph changes after the state is recorded.
Goal
localC0C1C2HEAD main
Git trainer0 commands
terminal
localC0C1HEAD main