Skip to main content
Senior

Git Fetch

Senior

Task

Download all new commits and branch positions from origin without merging them into your local work.

Requirements

  • Update the data about all available remote branches.
  • Do not move the local branches main and bugFix.
  • Do not create merge or rebase commits.

Expected result

The remote-tracking branches o/main and o/bugFix must reflect the state of origin, and the local branches and HEAD must stay on their previous commits.

What you will learn

After completing the task, you will be able to:

  • download changes without integrating them;
  • understand which pointers fetch moves;
  • safely inspect the state of origin before a merge or rebase.
Goal
localC0C1C2mainC3HEAD bugFixC4C5o/mainC6C7o/bugFix
originC0C1C2C3C4C5mainC6C7HEAD bugFix
Git trainer0 commands
terminal
localC0C1C2main o/mainC3HEAD bugFix o/bugFix
originC0C1C2C3C4C5mainC6C7HEAD bugFix