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]>
23 lines
1.6 KiB
JSON
23 lines
1.6 KiB
JSON
{
|
|
"id": "git-diverged-branches-mcq",
|
|
"title": "Your Branch and the Remote Have Diverged",
|
|
"category": "Git",
|
|
"isolation_type": "shared_namespace",
|
|
"difficulty": "Medium",
|
|
"type": "mcq",
|
|
"weight": 4,
|
|
"description": "## Your Branch and the Remote Have Diverged\n\n`git status` reports \"Your branch and 'origin/main' have diverged, and have 2 and 3 different commits each, respectively.\" What should you understand BEFORE blindly running `git pull`?",
|
|
"options": [
|
|
{ "id": "a", "text": "Nothing — git pull always resolves this automatically and safely with no side effects" },
|
|
{ "id": "b", "text": "That a pull here will attempt to merge (or rebase, depending on config) the remote's 3 commits with your own 2 local commits, which can itself produce a conflict you'll need to resolve — the same way two diverged branches did in this course's merge exercise" },
|
|
{ "id": "c", "text": "That you must delete your local commits first" },
|
|
{ "id": "d", "text": "That the remote repository is corrupted" }
|
|
],
|
|
"correct_option": "b",
|
|
"explanation": "\"Diverged\" means both sides have commits the other doesn't have — a plain `git pull` is really fetch-then-merge (or rebase), and merging two sets of independent commits can conflict exactly like the local branch-merge exercise did, just with a remote branch instead of a local one. Understanding this before pulling means you won't be surprised by a conflict, and you definitely don't need to delete anything or assume corruption.",
|
|
"hints": [],
|
|
"setup_commands": [],
|
|
"default_namespace": "default",
|
|
"teardown_commands": []
|
|
}
|