Sign inSign up free

511. Split a Commit in Two

hard 40 XP ~10 minHands-on lab

In /home/student/repos/docs-site, the last commit on main, "Update config and fix login bug", does two unrelated things: it changes config.yaml and fixes a bug in login.py. The team wants them as separate commits so the fix can be cherry-picked to the release branch on its own. It hasn't been pushed.

Task

Replace that commit with two commits:

  1. Update config: only the config.yaml change,
  2. Fix login bug: only the login.py change, on top of the first.

The final files must be exactly the same as now, the commits before it must be untouched, and the working tree must be clean.

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: Who Removed That Function?

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.