Skip to main content
Senior

Faking Teamwork

Senior

Task

Someone else's commit has already appeared on origin. Synchronize main, add your own commit on top of the other person's work, and publish the shared result.

Steps

  1. Pull the changes from origin into the local main.
  2. Create one new local commit.
  3. Push the updated main back to origin.

Expected result

The local main, o/main and the remote main must point to your new commit, which sits after the previously published commit by the other person.

What you will learn

After completing the task, you will be able to:

  • build a safe pull → commit → push cycle;
  • take other people's changes into account before publishing your own;
  • keep the histories of the local and remote repositories consistent.
Goal
localC0C1C2C3HEAD main o/main
originC0C1C2C3HEAD main
Git trainer0 commands
terminal
localC0C1HEAD main o/main
originC0C1C2HEAD main