fix(chain): note forward-referenced git commands; fix M6 prerequisites

- M11: keep `git reset --hard HEAD~1` (needed to trigger the protected-branch
  rejection) but flag it as a later-module, history-rewriting command (Module 12).
- Stop presenting rebase/pull --rebase as a casual step: M8 leads with the
  beginner-safe recreate-remote and footnotes pull --rebase as out-of-scope;
  M26 merge-only; M11 mentions rebase-merge only as out-of-scope awareness.
- M6: add Module 3 to prerequisites and back-reference the branch material it
  first taught (branch/switch/merge on docs).

Closes #33
Closes #34
Closes #35

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01TfzV5QvtPDz8LJS3Pu5VLT
This commit is contained in:
2026-06-22 17:06:43 -04:00
parent c34052665f
commit f437d7683b
4 changed files with 33 additions and 15 deletions
+7 -4
View File
@@ -111,10 +111,13 @@ everywhere.
**2. The remote isn't empty (non-fast-forward).** You let the host create the repo *with* a README,
then push, and get `! [rejected] ... (fetch first)` or `non-fast-forward`. The remote has a commit
your local history doesn't, so Git refuses to overwrite it. Fix: either recreate the remote empty, or
reconcile once with `git pull --rebase origin main` and then push. (This is the same "someone else
pushed before me" situation you'll hit constantly once you're collaborating — Module 11 — except here
the "someone else" was the host's auto-generated README.)
your local history doesn't, so Git refuses to overwrite it. The simple fix is to **recreate the remote
empty** and push again. (The alternative you'll see online — `git pull --rebase origin main`, then
push — replays your commits on top of the remote's, but `rebase` is an advanced, history-rewriting
operation this course doesn't teach as a step here, so prefer the empty-remote fix for now. And note
that plain `git pull` won't rescue you against an auto-README remote — it refuses to merge unrelated
histories.) This is the same "someone else pushed before me" situation you'll hit constantly once
you're collaborating — Module 11 — except here the "someone else" was the host's auto-generated README.
**3. Branch-name mismatch.** Your local default branch is `master` but the host expects `main` (or
vice versa). `git push -u origin main` then errors with `src refspec main does not match any`. Fix: