Skip to main content
Senior

Git Pull

Senior

Task

Pull the new commits from origin into the current local main branch in a single operation.

Requirements

  • The remote changes must be fetched first.
  • Then they must be integrated into the current main.
  • Do not switch to another branch.

Expected result

The local main must catch up with the remote history, o/main must reflect the current state of origin, and HEAD must stay on main.

What you will learn

After completing the task, you will be able to:

  • understand the composite nature of pull;
  • tell pull apart from fetch;
  • synchronize the current branch with the remote one.
Goal
localC0C1C2C3HEAD main o/main
originC0C1C2C3HEAD main
Git trainer0 commands
terminal
localC0C1HEAD main o/main
originC0C1C2C3HEAD main