Initialize the Module 2 repo with git init -b main so every main reference downstream resolves #5

Closed
opened 2026-06-22 14:23:39 -04:00 by claude · 0 comments
Contributor

Problem

Module 2's lab runs a bare git init, which names the initial branch master on stock Git (confirmed 2.53.0; the default does not change until Git 3.0). Nothing in modules/ sets init.defaultBranch or renames the branch. From Module 3 onward, labs run git switch main, git merge from main, git diff main.., and Module 2's own memory table hands out git log main..HEAD — all of which fail with fatal: invalid reference: main / fatal: ambiguous argument 'main..HEAD' for the audience least likely to have configured Git. The course is internally inconsistent: Module 8 (git branch -m main) explicitly assumes learners may be on master, yet nothing ever establishes main.

Evidence

modules/02-version-control-as-a-safety-net/README.md line 157: git init (no -b), and line 93 memory table: git log main..HEAD.
Downstream main refs: M3 git switch main (~line 287); M10 git diff main..ai-delete-command (~line 249) and merge (~line 232); plus M6/M7/M11/M12/M26 and status.sh.
Reproduced: stock git init → branch master; git switch mainfatal: invalid reference: main.

Why it matters

Breaks the M3+ lab chain with copy-paste main commands for the no-config-assumption audience — a core promise that labs run on the learner's own machine without assumed setup. This is a load-bearing dependency-chain defect.

Proposed change

  1. In Module 2's Part A, initialize with git init -b main (Git 2.28+).
  2. Add a one-line fallback for older Git: after the first commit, git branch -m master main.
  3. Reconcile now-stale wording elsewhere so it stays consistent: M8 line ~122 ("if your default branch is master… rename it") and M6 line ~50 ("usually called main") should acknowledge that this course's repo is guaranteed main from Module 2.

Acceptance criteria

  • Module 2 lab creates a repo on main (with an older-Git fallback documented).
  • A fresh run of the M3/M6/M7/M10 lab commands referencing main succeeds.
  • M8/M6 wording no longer contradicts the M2 guarantee.

Affected files

  • modules/02-version-control-as-a-safety-net/README.md
  • (wording reconciliation) modules/06-branches-sandboxes-for-experiments/README.md, modules/08-remotes-and-hosting/README.md

References

Source finding F4 (realVotes 3/3, blocker). Touches locked exemplar Module 2 — preserve its voice/structure. Repo-scoped -b main is cleaner than mutating global init.defaultBranch.


Filed from an adversarial multi-agent course review (217 raw findings → 54 adversarially-verified survivors). Scoped for manual review; intentionally not auto-assigned to an agent.

## Problem Module 2's lab runs a bare `git init`, which names the initial branch `master` on stock Git (confirmed 2.53.0; the default does not change until Git 3.0). Nothing in `modules/` sets `init.defaultBranch` or renames the branch. From Module 3 onward, labs run `git switch main`, `git merge` from main, `git diff main..`, and Module 2's own memory table hands out `git log main..HEAD` — all of which fail with `fatal: invalid reference: main` / `fatal: ambiguous argument 'main..HEAD'` for the audience least likely to have configured Git. The course is internally inconsistent: Module 8 (`git branch -m main`) explicitly assumes learners may be on `master`, yet nothing ever establishes `main`. ## Evidence `modules/02-version-control-as-a-safety-net/README.md` line 157: `git init` (no `-b`), and line 93 memory table: `git log main..HEAD`. Downstream `main` refs: M3 `git switch main` (~line 287); M10 `git diff main..ai-delete-command` (~line 249) and merge (~line 232); plus M6/M7/M11/M12/M26 and `status.sh`. Reproduced: stock `git init` → branch `master`; `git switch main` → `fatal: invalid reference: main`. ## Why it matters Breaks the M3+ lab chain with copy-paste `main` commands for the no-config-assumption audience — a core promise that labs run on the learner's own machine without assumed setup. This is a load-bearing dependency-chain defect. ## Proposed change 1. In Module 2's Part A, initialize with `git init -b main` (Git 2.28+). 2. Add a one-line fallback for older Git: after the first commit, `git branch -m master main`. 3. Reconcile now-stale wording elsewhere so it stays consistent: M8 line ~122 ("if your default branch is `master`… rename it") and M6 line ~50 ("usually called `main`") should acknowledge that this course's repo is guaranteed `main` from Module 2. ## Acceptance criteria - [ ] Module 2 lab creates a repo on `main` (with an older-Git fallback documented). - [ ] A fresh run of the M3/M6/M7/M10 lab commands referencing `main` succeeds. - [ ] M8/M6 wording no longer contradicts the M2 guarantee. ## Affected files - `modules/02-version-control-as-a-safety-net/README.md` - (wording reconciliation) `modules/06-branches-sandboxes-for-experiments/README.md`, `modules/08-remotes-and-hosting/README.md` ## References Source finding F4 (realVotes 3/3, blocker). Touches locked exemplar Module 2 — preserve its voice/structure. Repo-scoped `-b main` is cleaner than mutating global `init.defaultBranch`. --- *Filed from an adversarial multi-agent course review (217 raw findings → 54 adversarially-verified survivors). Scoped for manual review; intentionally not auto-assigned to an agent.*
claude added the ai-readybugP1 labels 2026-06-22 14:23:39 -04:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: justin/ai-workflow-course#5