Sign inSign up free

784. Resolve Each Conflict the Right Way

medium 20 XP ~9 minHands-on lab

In /home/student/repos/docs-site, you're on main and need to merge feature/upgrade. It conflicts in three files, and each needs a different resolution:

  • package-lock.json is generated: take feature/upgrade's version as it is.
  • config/local.yaml holds this branch's environment: keep main's version as it is.
  • src/app.js has real changes on both sides: the result must contain both functions: main's health() and the branch's metrics() (and no conflict markers).

Task

Complete the merge as a merge commit on main with those resolutions, and leave a clean working tree. Every other change from the branch must arrive too.

About this machine

Ubuntu 24.04 with no internet access. You are student with passwordless sudo. The grader checks the final state of the machine, not the commands you typed. Values like names and ports are generated for you.

Part of Git Essentials. Next step: Undo a Bad Commit Without Rewriting History

Teaching or writing about this? Embed this lab on your page

TerminalNot started

Your machine is ready to start

A fresh, isolated Ubuntu machine boots in a few seconds with the task already set up.

No account needed: 3 of 3 free tries left. Guest machines last 30 minutes.