Rullst AcademyRullst Academy/Lesson
Git: changes as a team · Lesson 09 / 10

Merge and know how to undo

Finishing review includes choosing integration and planning an understandable recovery.

Learning paths16 min

Let's discover together

  1. 1

    Confirm current head/base, reviewed changes, tests, resolved discussions and merge permission. Our lab uses merge --no-ff to show a two-parent commit. Fast-forward advances the reference; squash records the combined change as a new commit. Available GitHub methods depend on configuration.

  2. 2

    In reviewer, update the review branch with --ff-only, run tests and record the hash before merging into main. Check the result and push to the local remote. If unexpected divergence appears, inspect it instead of using force as a shortcut.

  3. 3

    LAB.md then creates an ordinary commit with a deliberate defect only in the fictional repository. Git revert --no-edit HEAD creates another commit undoing that change while preserving history. Check hash and content first; do not apply the recipe to real work without examining changes.

  4. 4

    Reverting may also conflict and does not undo external effects such as sent email. Reverting merge commits needs additional mainline-parent choices and is outside this exercise. Record commit, reason, tests and limits in ROLLBACK.md; do not rewrite shared history to hide the defect.

One change, two roles

Download the kit and follow LAB.md in a new folder. Commands here are reading references; the site does not execute them. Use Git Bash on Windows and a terminal on macOS/Ubuntu. Earlier tracks cover Git and Python setup.

git show --stat HEAD
git rev-parse HEAD
git revert --no-edit HEAD
python -m unittest discover -v
My files and GitHub

Edit, download and send your Markdown notebook to GitHub with confirmation. It does not run Git or open pull requests. The kit is the starter; save edits separately.

Official links and next step

✦
YOUR MISSION

Merge the reviewed version and revert an ordinary commit while preserving history.

Now it's your turn

Discovery workshop

A decision with evidence

After merging, ordinary commit C reintroduces the defect. Revert produces R and tests pass.
Build your answers and check when you are ready.
A moment to understand

What happened to C?

I need a hint

Compare the agreement with the diff and evidence for the current commit.

Loading your journey…

Take it with you

Revert only the lab’s ordinary commit, record hashes and show that the 120 test passes again.

At your own pace

My files and GitHub

Every lesson can become your own record: code, notes or a practice plan. Saving a file to GitHub is optional and does not change your XP.

Student guide

The editor and downloads open when this lesson is available to your account. Check access below or return to the track map.

Checking your access to this lesson…

Rullstpetbot

AI can make mistakes. Check the lesson material.