Files
rootnode-academy/content/root/root-03-git-collaborative-development/m06-engineering-git-workflow/02-demonstration-a-bad-commit-vs-a-good-one.md
T
ced4568andClaude Sonnet 5 e68b6f445a feat(root03): author Git & Collaborative Development
Adds all 6 ROOT 03 modules (why version control exists, the Git mental model, everyday Git,
branching & merging, remote repositories, engineering Git workflow) — 31 activities. Uses only
real LOCAL Git repositories throughout — no Gitea account, no network access, and no
RootNode-canonical-repo credential is ever needed or exposed in a student Lab
(docs/ROOT_FOUNDATIONS_LAB_STRATEGY.md §4). Modules 1, 2, and 6 are conceptual bookends with no
lab, matching the flexible readiness standard already used in ROOT 01/02.

Adds 3 new hands-on Git scenarios plus 2 MCQs: git-everyday-basics (init/add/commit, validated
by inspecting real `git log`/`git show` state, not just command output strings — Step 6's
explicit requirement), git-branching-and-merge (a REAL merge conflict caused on purpose by two
branches editing the same line, resolved by the student, validated by confirming the conflict
markers are gone and a real two-parent merge commit exists), and git-remote-clone-push (a real
local bare repository standing in for a remote — clone/commit/push validated by inspecting the
REMOTE side directly, not just the student's own clone). All tested end-to-end via the real
scenario-validation API, including negative tests.

Wires rootnode-git-fundamentals-assessment (2 required + 3 random-draw scenarios) using the
existing Phase 3B assessment engine.

Co-Authored-By: Claude Sonnet 5 <[email protected]>
2026-08-26 17:08:00 -05:00

48 lines
1.4 KiB
Markdown

# Demonstration: The Same Change, Told Two Ways
## OBSERVE
```
$ git log --oneline
a1b2c3d fixed stuff
```
One commit, an unhelpful message, and (imagine) 15 unrelated files changed together: a bug fix,
a typo correction, and an unrelated half-finished experiment.
## HYPOTHESIS
Predict: six months from now, could you (or a teammate) confidently `git revert` just the bug
fix from this commit, leaving the other 14 files untouched?
## INSPECT
No — reverting this ONE commit reverts everything in it together, including the unrelated
typo fix and experiment, whether you want that or not.
## CHANGE
The same work, done as three separate, well-described commits instead:
```
$ git log --oneline
3f9a1c2 Fix null-pointer crash in payment retry logic
9d8e7f6 Fix typo in onboarding email template
1a2b3c4 WIP: experiment with new caching strategy (not ready)
```
## VERIFY
Now `git revert 3f9a1c2` cleanly undoes JUST the payment bug fix, with zero effect on the other
two — because each commit is one logical, independently-reversible unit of work.
## Instructor Notes
**Demo goal:** Make the practical cost of "fixed stuff" commits concrete — not a style
preference, a genuine loss of capability (precise revert, clear history, easier review).
**Approximate timing:** 8 minutes live.
**Common mistake to watch for:** treating this as a purely aesthetic preference rather than a
practical one — reinforce the concrete "can you revert just the bug fix" test.