Initialize the Module 2 repo with git init -b main so every main reference downstream resolves
#5
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Problem
Module 2's lab runs a bare
git init, which names the initial branchmasteron stock Git (confirmed 2.53.0; the default does not change until Git 3.0). Nothing inmodules/setsinit.defaultBranchor renames the branch. From Module 3 onward, labs rungit switch main,git mergefrom main,git diff main.., and Module 2's own memory table hands outgit log main..HEAD— all of which fail withfatal: 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 onmaster, yet nothing ever establishesmain.Evidence
modules/02-version-control-as-a-safety-net/README.mdline 157:git init(no-b), and line 93 memory table:git log main..HEAD.Downstream
mainrefs: M3git switch main(~line 287); M10git diff main..ai-delete-command(~line 249) and merge (~line 232); plus M6/M7/M11/M12/M26 andstatus.sh.Reproduced: stock
git init→ branchmaster;git switch main→fatal: invalid reference: main.Why it matters
Breaks the M3+ lab chain with copy-paste
maincommands 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
git init -b main(Git 2.28+).git branch -m master main.master… rename it") and M6 line ~50 ("usually calledmain") should acknowledge that this course's repo is guaranteedmainfrom Module 2.Acceptance criteria
main(with an older-Git fallback documented).mainsucceeds.Affected files
modules/02-version-control-as-a-safety-net/README.mdmodules/06-branches-sandboxes-for-experiments/README.md,modules/08-remotes-and-hosting/README.mdReferences
Source finding F4 (realVotes 3/3, blocker). Touches locked exemplar Module 2 — preserve its voice/structure. Repo-scoped
-b mainis cleaner than mutating globalinit.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.