# M03-L04 — Resolve a conflict and undo a fault

**Outcome:** Resolve intended text and distinguish restoring a working edit from reverting a committed fault.

**Start:** M03-L03; separate clones of the supplied generic history bundle.

Use three disposable exercise folders for conflict, restore, and revert. The prepared bundle contains generic teaching history. It is separate from your useful project and contains stable content tags and two conflict branches. Begin each operation by inspecting location, status, and history.

For the conflict clone, create your branch from `origin/practice-conflict-left` and merge `origin/practice-conflict-right`. The two branches change the same README report-label line. Read both meanings and resolve to `Report label: synthetic teaching input.` Remove all markers, stage README, inspect the cached diff, and commit. Accepting both sides automatically can leave duplicated or contradictory text. [git merge](https://git-scm.com/docs/git-merge)

For restore, start a separate clean CP01 branch, make one unwanted unstaged README edit, inspect it, then use `git restore -- README.md` only after deciding to discard that edit. The default source is the index, which matches the baseline in this prepared clean-start example. `--staged` would instead alter staging selection. [git restore](https://git-scm.com/docs/git-restore)

For revert, create a branch from `FAULT-hysteresis` in another clone. This prepared later-project fault uses a strict comparison that misses the clear boundary at 27.0 °C. You need not implement the later policy now; use its supplied expected case to practice historical recovery. Inspect HEAD, reproduce the failing native test, run `git revert --no-edit HEAD`, and rerun `scripts/test.cmd` plus the firmware build. [git revert](https://git-scm.com/docs/git-revert)

A revert records a new corrective commit and preserves earlier history. Record actual before/after output and keep it labeled software evidence. The use of a later prepared fault is a Git exercise, not a claim that you have completed the capstone.

![A feature develops from a baseline, is reviewed and merged, and a later fault can be reversed by a new commit while the faulty commit remains in history.](../../../../book/figures/D07.png)

*D07. A feature develops from a baseline, is reviewed and merged, and a later fault can be reversed by a new commit while the faulty commit remains in history.*

## Practice and completion

Complete the [exercise](exercise.md), then compare your artifact with the separately distributed instructor answer. A lesson acknowledgment records your own progress; it does not certify that a physical test occurred.

## Reading and figures

[Chapter 7](../../../../book/chapters/ch07/chapter.md). Resources: [Exact recovery sequence](../../../../book/chapters/ch07/resources/recovery-sequence.md). Figure references: SS07-04–06; D07. 
