When a learner can reproduce a familiar example but a small variation causes confusion, the problem is usually an incomplete model rather than a lack of effort. The fastest useful response is to expose the hidden state and test one boundary at a time.
Git checkout-index copies selected entries from the index into the working tree or into temporary or prefixed destinations. It is a plumbing command: with no paths and no –all it does nothing, and by default it refuses to overwrite existing files. Mastery means identifying the exact index state, destination path, overwrite policy and conflict stage before any bytes are materialised. This guide begins with that mechanism, then develops it through worked traces, deliberate mistakes, explained practice and transfer decisions.
The aim is independent reasoning. A learner should be able to predict behaviour, locate the earliest wrong assumption, use a safe diagnostic procedure and defend a design choice in a new project.
Punggol families can use the guide in short sessions around homework, CCAs and rest. The activities are proposed learning exercises, not claims about a physical branch, timetable, class size, fee, school relationship or guaranteed result.
Use disposable data and repositories, preserve backups, and check version-sensitive details against the official source. Current documentation settles a technical contract; observation and explanation turn that contract into usable knowledge.
Find your next learning step
Choose the route that matches the present difficulty. Use the complete index for a systematic course.
Build the model
Chapters 1-4 . Begin here, then continue after the learner can predict, verify and explain.
Use the core tools
Chapters 5-8 . Begin here, then continue after the learner can predict, verify and explain.
Handle boundaries
Chapters 9-12 . Begin here, then continue after the learner can predict, verify and explain.
Debug and verify
Chapters 13-16 . Begin here, then continue after the learner can predict, verify and explain.
Transfer with judgment
Chapters 17-20 . Begin here, then continue after the learner can predict, verify and explain.
Open the full chapter index . Jump to capstone practice . Use the How Studying Works hub . Read the official documentation
Complete chapter index
Chapters 1-4 . Build the model
Chapters 5-8 . Use the core tools
Chapters 9-12 . Handle boundaries
Chapters 13-16 . Debug and verify
Chapters 17-20 . Transfer with judgment
checkout-index materialises the blob and mode recorded in the index, not necessarily HEAD and not necessarily the current working-tree file. Treat that sentence as a testable model. A secure learner can point to the relevant input, name the operation, describe the resulting state and identify one observation that would prove the model incomplete.
The high-value mistake in this chapter is saying restore from Git without naming which state is being copied. It matters because the output may look reasonable while the ownership, ordering, identity or safety rule is wrong. Compare HEAD, index and working tree with three commands before checkout.
For the The index is the source chapter on Git checkout-index, use a two-column trace during a short Punggol home session. On the left, write the predicted state for this exact mechanism before the tool runs. On the right, record the observation that bears on saying restore from Git without naming which state is being copied. Explain the earliest difference with one causal sentence, then repeat only the smallest changed case.
Core worked example
git diff --cached -- notes.txt
git diff -- notes.txt
git checkout-index -- notes.txtExplained result. The copied content comes from the staged index entry for notes.txt. Check the boundary as well as the happy path: ask what happens with an empty input, a duplicate or tied value, an unsupported type, a missing path, a NULL, or a second reference to the same object. Only the relevant boundary should be kept; the list is a prompt for judgment, not a demand to force every case into every example.
Four purposeful transfer cases
Case 1: school website repository. Predict the rule using staged HTML, an edited working copy and a disposable export folder. State the input grain or object graph, the chapter boundary and the intended output before choosing syntax. Change only one variable, so a wrong prediction has a single plausible cause.
Reasoned route. Begin with “checkout-index materialises the blob and mode recorded in the index, not necessarily HEAD and not necessarily the current working-tree file.” Apply this procedure: Compare HEAD, index and working tree with three commands before checkout. The expected mechanism is: The copied content comes from the staged index entry for notes.txt. For the school website repository, add one near-miss that exposes saying restore from Git without naming which state is being copied. The answer is complete only when it says why the near-miss fails and how the corrected model transfers to a different project without relying on the original variable names.
Case 2: coding CCA project. Contrast the rule using selected source files, generated output and a safe restoration test. State the input grain or object graph, the chapter boundary and the intended output before choosing syntax. Change only one variable, so a wrong prediction has a single plausible cause.
Reasoned route. Begin with “checkout-index materialises the blob and mode recorded in the index, not necessarily HEAD and not necessarily the current working-tree file.” Apply this procedure: Compare HEAD, index and working tree with three commands before checkout. The expected mechanism is: The copied content comes from the staged index entry for notes.txt. For the coding CCA project, add one near-miss that exposes saying restore from Git without naming which state is being copied. The answer is complete only when it says why the near-miss fails and how the corrected model transfers to a different project without relying on the original variable names.
Case 3: science data script. Stress-test the rule using a staged parser, local experiment edits and a clean comparison copy. State the input grain or object graph, the chapter boundary and the intended output before choosing syntax. Change only one variable, so a wrong prediction has a single plausible cause.
Reasoned route. Begin with “checkout-index materialises the blob and mode recorded in the index, not necessarily HEAD and not necessarily the current working-tree file.” Apply this procedure: Compare HEAD, index and working tree with three commands before checkout. The expected mechanism is: The copied content comes from the staged index entry for notes.txt. For the science data script, add one near-miss that exposes saying restore from Git without naming which state is being copied. The answer is complete only when it says why the near-miss fails and how the corrected model transfers to a different project without relying on the original variable names.
Case 4: revision notes repository. Explain the rule using tracked Markdown, an index snapshot and an export prefix. State the input grain or object graph, the chapter boundary and the intended output before choosing syntax. Change only one variable, so a wrong prediction has a single plausible cause.
Reasoned route. Begin with “checkout-index materialises the blob and mode recorded in the index, not necessarily HEAD and not necessarily the current working-tree file.” Apply this procedure: Compare HEAD, index and working tree with three commands before checkout. The expected mechanism is: The copied content comes from the staged index entry for notes.txt. For the revision notes repository, add one near-miss that exposes saying restore from Git without naming which state is being copied. The answer is complete only when it says why the near-miss fails and how the corrected model transfers to a different project without relying on the original variable names.
Diagnostic route
- Model check: ask the learner to draw or list the exact rows, fields, references, paths or states involved.
- Boundary check: create the smallest input that triggers saying restore from Git without naming which state is being copied.
- Evidence check: separate a printed value from identity, ordering, ownership, type or repository state.
- Repair check: use the reversible procedure “Compare HEAD, index and working tree with three commands before checkout.” and record the first changed observation.
- Transfer check: repeat the rule in a second context and identify what remains invariant.
A parent does not need to know the final Git checkout-index syntax. For this chapter, useful prompts are: “What did you expect from The index is the source?”, “Which state changed first?”, “What evidence tests that prediction?”, and “Can the case exposing saying restore from Git without naming which state is being copied be made smaller?” The learner, not the parent, should supply the technical explanation.
Practice with an explained answer
Question. Build a tiny release bundle with a prepared index, a clean destination and a verification manifest. Include one ordinary case, one boundary and one deliberate failure caused by saying restore from Git without naming which state is being copied. Predict each result before using a tool, then report the first point where observation differs from prediction.
Answer guide. A strong response starts with the rule: checkout-index materialises the blob and mode recorded in the index, not necessarily HEAD and not necessarily the current working-tree file. It shows a trace, not only a final value. The ordinary case should demonstrate “The copied content comes from the staged index entry for notes.txt.” The boundary must exercise the same mechanism at an edge, and the deliberate failure must be repaired with: Compare HEAD, index and working tree with three commands before checkout. Other data choices are valid when the evidence supports the same causal chain.
Decision and transfer
For The index is the source, separate the documented Git checkout-index mechanism from the project policy. State exactly what the technical contract guarantees, then state the project choice about validation, ordering, ownership, performance or recovery. Test whether the same distinction survives one transfer case, and keep stateful experiments disposable and backed up.
Previous chapter . Contents . Next chapter
Without –temp or a prefix, selected entries are written at their indexed paths under the working tree. Treat that sentence as a testable model. A secure learner can point to the relevant input, name the operation, describe the resulting state and identify one observation that would prove the model incomplete.
The high-value mistake in this chapter is running the command from an unexpected location and misreading relative output paths. It matters because the output may look reasonable while the ownership, ordering, identity or safety rule is wrong. Confirm git rev-parse –show-toplevel and the exact pathspec before execution.
For the The destination is normally the working tree chapter on Git checkout-index, use a two-column trace during a short Punggol home session. On the left, write the predicted state for this exact mechanism before the tool runs. On the right, record the observation that bears on running the command from an unexpected location and misreading relative output paths. Explain the earliest difference with one causal sentence, then repeat only the smallest changed case.
Core worked example
git rev-parse --show-toplevel
git checkout-index -- src/app.jsExplained result. The indexed src/app.js is copied to that working-tree path when safety rules permit. Check the boundary as well as the happy path: ask what happens with an empty input, a duplicate or tied value, an unsupported type, a missing path, a NULL, or a second reference to the same object. Only the relevant boundary should be kept; the list is a prompt for judgment, not a demand to force every case into every example.
Four purposeful transfer cases
Case 1: science data script. Contrast the rule using a staged parser, local experiment edits and a clean comparison copy. State the input grain or object graph, the chapter boundary and the intended output before choosing syntax. Change only one variable, so a wrong prediction has a single plausible cause.
Reasoned route. Begin with “Without –temp or a prefix, selected entries are written at their indexed paths under the working tree.” Apply this procedure: Confirm git rev-parse –show-toplevel and the exact pathspec before execution. The expected mechanism is: The indexed src/app.js is copied to that working-tree path when safety rules permit. For the science data script, add one near-miss that exposes running the command from an unexpected location and misreading relative output paths. The answer is complete only when it says why the near-miss fails and how the corrected model transfers to a different project without relying on the original variable names.
Case 2: revision notes repository. Stress-test the rule using tracked Markdown, an index snapshot and an export prefix. State the input grain or object graph, the chapter boundary and the intended output before choosing syntax. Change only one variable, so a wrong prediction has a single plausible cause.
Reasoned route. Begin with “Without –temp or a prefix, selected entries are written at their indexed paths under the working tree.” Apply this procedure: Confirm git rev-parse –show-toplevel and the exact pathspec before execution. The expected mechanism is: The indexed src/app.js is copied to that working-tree path when safety rules permit. For the revision notes repository, add one near-miss that exposes running the command from an unexpected location and misreading relative output paths. The answer is complete only when it says why the near-miss fails and how the corrected model transfers to a different project without relying on the original variable names.
Case 3: team merge lab. Explain the rule using base, ours and theirs stages for one conflicted file. State the input grain or object graph, the chapter boundary and the intended output before choosing syntax. Change only one variable, so a wrong prediction has a single plausible cause.
Reasoned route. Begin with “Without –temp or a prefix, selected entries are written at their indexed paths under the working tree.” Apply this procedure: Confirm git rev-parse –show-toplevel and the exact pathspec before execution. The expected mechanism is: The indexed src/app.js is copied to that working-tree path when safety rules permit. For the team merge lab, add one near-miss that exposes running the command from an unexpected location and misreading relative output paths. The answer is complete only when it says why the near-miss fails and how the corrected model transfers to a different project without relying on the original variable names.
Case 4: release bundle. Transfer the rule using a prepared index, a clean destination and a verification manifest. State the input grain or object graph, the chapter boundary and the intended output before choosing syntax. Change only one variable, so a wrong prediction has a single plausible cause.
Reasoned route. Begin with “Without –temp or a prefix, selected entries are written at their indexed paths under the working tree.” Apply this procedure: Confirm git rev-parse –show-toplevel and the exact pathspec before execution. The expected mechanism is: The indexed src/app.js is copied to that working-tree path when safety rules permit. For the release bundle, add one near-miss that exposes running the command from an unexpected location and misreading relative output paths. The answer is complete only when it says why the near-miss fails and how the corrected model transfers to a different project without relying on the original variable names.
Diagnostic route
- Model check: ask the learner to draw or list the exact rows, fields, references, paths or states involved.
- Boundary check: create the smallest input that triggers running the command from an unexpected location and misreading relative output paths.
- Evidence check: separate a printed value from identity, ordering, ownership, type or repository state.
- Repair check: use the reversible procedure “Confirm git rev-parse –show-toplevel and the exact pathspec before execution.” and record the first changed observation.
- Transfer check: repeat the rule in a second context and identify what remains invariant.
A parent does not need to know the final Git checkout-index syntax. For this chapter, useful prompts are: “What did you expect from The destination is normally the working tree?”, “Which state changed first?”, “What evidence tests that prediction?”, and “Can the case exposing running the command from an unexpected location and misreading relative output paths be made smaller?” The learner, not the parent, should supply the technical explanation.
Practice with an explained answer
Question. Build a tiny filename safety test with spaces, leading dashes and NUL-delimited path input. Include one ordinary case, one boundary and one deliberate failure caused by running the command from an unexpected location and misreading relative output paths. Predict each result before using a tool, then report the first point where observation differs from prediction.
Answer guide. A strong response starts with the rule: Without –temp or a prefix, selected entries are written at their indexed paths under the working tree. It shows a trace, not only a final value. The ordinary case should demonstrate “The indexed src/app.js is copied to that working-tree path when safety rules permit.” The boundary must exercise the same mechanism at an edge, and the deliberate failure must be repaired with: Confirm git rev-parse –show-toplevel and the exact pathspec before execution. Other data choices are valid when the evidence supports the same causal chain.
Decision and transfer
For The destination is normally the working tree, separate the documented Git checkout-index mechanism from the project policy. State exactly what the technical contract guarantees, then state the project choice about validation, ordering, ownership, performance or recovery. Test whether the same distinction survives one transfer case, and keep stateful experiments disposable and backed up.
Previous chapter . Contents . Next chapter
A bare git checkout-index intentionally selects nothing; –all or explicit paths are required. Treat that sentence as a testable model. A secure learner can point to the relevant input, name the operation, describe the resulting state and identify one observation that would prove the model incomplete.
The high-value mistake in this chapter is assuming an omitted path means every indexed file. It matters because the output may look reasonable while the ownership, ordering, identity or safety rule is wrong. Use –all only when the broad scope is deliberate, and log the selected scope.
For the No arguments means no work chapter on Git checkout-index, use a two-column trace during a short Punggol home session. On the left, write the predicted state for this exact mechanism before the tool runs. On the right, record the observation that bears on assuming an omitted path means every indexed file. Explain the earliest difference with one causal sentence, then repeat only the smallest changed case.
Core worked example
git checkout-index
git status --shortExplained result. The first command performs no checkout, which makes empty scripted path lists safer. Check the boundary as well as the happy path: ask what happens with an empty input, a duplicate or tied value, an unsupported type, a missing path, a NULL, or a second reference to the same object. Only the relevant boundary should be kept; the list is a prompt for judgment, not a demand to force every case into every example.
Four purposeful transfer cases
Case 1: team merge lab. Stress-test the rule using base, ours and theirs stages for one conflicted file. State the input grain or object graph, the chapter boundary and the intended output before choosing syntax. Change only one variable, so a wrong prediction has a single plausible cause.
Reasoned route. Begin with “A bare git checkout-index intentionally selects nothing; –all or explicit paths are required.” Apply this procedure: Use –all only when the broad scope is deliberate, and log the selected scope. The expected mechanism is: The first command performs no checkout, which makes empty scripted path lists safer. For the team merge lab, add one near-miss that exposes assuming an omitted path means every indexed file. The answer is complete only when it says why the near-miss fails and how the corrected model transfers to a different project without relying on the original variable names.
Case 2: release bundle. Explain the rule using a prepared index, a clean destination and a verification manifest. State the input grain or object graph, the chapter boundary and the intended output before choosing syntax. Change only one variable, so a wrong prediction has a single plausible cause.
Reasoned route. Begin with “A bare git checkout-index intentionally selects nothing; –all or explicit paths are required.” Apply this procedure: Use –all only when the broad scope is deliberate, and log the selected scope. The expected mechanism is: The first command performs no checkout, which makes empty scripted path lists safer. For the release bundle, add one near-miss that exposes assuming an omitted path means every indexed file. The answer is complete only when it says why the near-miss fails and how the corrected model transfers to a different project without relying on the original variable names.
Case 3: filename safety test. Transfer the rule using spaces, leading dashes and NUL-delimited path input. State the input grain or object graph, the chapter boundary and the intended output before choosing syntax. Change only one variable, so a wrong prediction has a single plausible cause.
Reasoned route. Begin with “A bare git checkout-index intentionally selects nothing; –all or explicit paths are required.” Apply this procedure: Use –all only when the broad scope is deliberate, and log the selected scope. The expected mechanism is: The first command performs no checkout, which makes empty scripted path lists safer. For the filename safety test, add one near-miss that exposes assuming an omitted path means every indexed file. The answer is complete only when it says why the near-miss fails and how the corrected model transfers to a different project without relying on the original variable names.
Case 4: recovery rehearsal. Predict the rule using a temporary clone, known staged content and checksum evidence. State the input grain or object graph, the chapter boundary and the intended output before choosing syntax. Change only one variable, so a wrong prediction has a single plausible cause.
Reasoned route. Begin with “A bare git checkout-index intentionally selects nothing; –all or explicit paths are required.” Apply this procedure: Use –all only when the broad scope is deliberate, and log the selected scope. The expected mechanism is: The first command performs no checkout, which makes empty scripted path lists safer. For the recovery rehearsal, add one near-miss that exposes assuming an omitted path means every indexed file. The answer is complete only when it says why the near-miss fails and how the corrected model transfers to a different project without relying on the original variable names.
Diagnostic route
- Model check: ask the learner to draw or list the exact rows, fields, references, paths or states involved.
- Boundary check: create the smallest input that triggers assuming an omitted path means every indexed file.
- Evidence check: separate a printed value from identity, ordering, ownership, type or repository state.
- Repair check: use the reversible procedure “Use –all only when the broad scope is deliberate, and log the selected scope.” and record the first changed observation.
- Transfer check: repeat the rule in a second context and identify what remains invariant.
A parent does not need to know the final Git checkout-index syntax. For this chapter, useful prompts are: “What did you expect from No arguments means no work?”, “Which state changed first?”, “What evidence tests that prediction?”, and “Can the case exposing assuming an omitted path means every indexed file be made smaller?” The learner, not the parent, should supply the technical explanation.
Practice with an explained answer
Question. Build a tiny recovery rehearsal with a temporary clone, known staged content and checksum evidence. Include one ordinary case, one boundary and one deliberate failure caused by assuming an omitted path means every indexed file. Predict each result before using a tool, then report the first point where observation differs from prediction.
Answer guide. A strong response starts with the rule: A bare git checkout-index intentionally selects nothing; –all or explicit paths are required. It shows a trace, not only a final value. The ordinary case should demonstrate “The first command performs no checkout, which makes empty scripted path lists safer.” The boundary must exercise the same mechanism at an edge, and the deliberate failure must be repaired with: Use –all only when the broad scope is deliberate, and log the selected scope. Other data choices are valid when the evidence supports the same causal chain.
Decision and transfer
For No arguments means no work, separate the documented Git checkout-index mechanism from the project policy. State exactly what the technical contract guarantees, then state the project choice about validation, ordering, ownership, performance or recovery. Test whether the same distinction survives one transfer case, and keep stateful experiments disposable and backed up.
Previous chapter . Contents . Next chapter
checkout-index does not overwrite an existing destination file unless force is requested. Treat that sentence as a testable model. A secure learner can point to the relevant input, name the operation, describe the resulting state and identify one observation that would prove the model incomplete.
The high-value mistake in this chapter is expecting it to behave like a destructive restore command automatically. It matters because the output may look reasonable while the ownership, ordering, identity or safety rule is wrong. Create a disposable modified file, run without force and inspect both message and checksum.
For the Existing files are protected by default chapter on Git checkout-index, use a two-column trace during a short Punggol home session. On the left, write the predicted state for this exact mechanism before the tool runs. On the right, record the observation that bears on expecting it to behave like a destructive restore command automatically. Explain the earliest difference with one causal sentence, then repeat only the smallest changed case.
Core worked example
printf 'local work
' > notes.txt
git checkout-index -- notes.txtExplained result. The existing notes.txt is not overwritten by the default invocation. Check the boundary as well as the happy path: ask what happens with an empty input, a duplicate or tied value, an unsupported type, a missing path, a NULL, or a second reference to the same object. Only the relevant boundary should be kept; the list is a prompt for judgment, not a demand to force every case into every example.
Four purposeful transfer cases
Case 1: filename safety test. Explain the rule using spaces, leading dashes and NUL-delimited path input. State the input grain or object graph, the chapter boundary and the intended output before choosing syntax. Change only one variable, so a wrong prediction has a single plausible cause.
Reasoned route. Begin with “checkout-index does not overwrite an existing destination file unless force is requested.” Apply this procedure: Create a disposable modified file, run without force and inspect both message and checksum. The expected mechanism is: The existing notes.txt is not overwritten by the default invocation. For the filename safety test, add one near-miss that exposes expecting it to behave like a destructive restore command automatically. The answer is complete only when it says why the near-miss fails and how the corrected model transfers to a different project without relying on the original variable names.
Case 2: recovery rehearsal. Transfer the rule using a temporary clone, known staged content and checksum evidence. State the input grain or object graph, the chapter boundary and the intended output before choosing syntax. Change only one variable, so a wrong prediction has a single plausible cause.
Reasoned route. Begin with “checkout-index does not overwrite an existing destination file unless force is requested.” Apply this procedure: Create a disposable modified file, run without force and inspect both message and checksum. The expected mechanism is: The existing notes.txt is not overwritten by the default invocation. For the recovery rehearsal, add one near-miss that exposes expecting it to behave like a destructive restore command automatically. The answer is complete only when it says why the near-miss fails and how the corrected model transfers to a different project without relying on the original variable names.
Case 3: school website repository. Predict the rule using staged HTML, an edited working copy and a disposable export folder. State the input grain or object graph, the chapter boundary and the intended output before choosing syntax. Change only one variable, so a wrong prediction has a single plausible cause.
Reasoned route. Begin with “checkout-index does not overwrite an existing destination file unless force is requested.” Apply this procedure: Create a disposable modified file, run without force and inspect both message and checksum. The expected mechanism is: The existing notes.txt is not overwritten by the default invocation. For the school website repository, add one near-miss that exposes expecting it to behave like a destructive restore command automatically. The answer is complete only when it says why the near-miss fails and how the corrected model transfers to a different project without relying on the original variable names.
Case 4: coding CCA project. Contrast the rule using selected source files, generated output and a safe restoration test. State the input grain or object graph, the chapter boundary and the intended output before choosing syntax. Change only one variable, so a wrong prediction has a single plausible cause.
Reasoned route. Begin with “checkout-index does not overwrite an existing destination file unless force is requested.” Apply this procedure: Create a disposable modified file, run without force and inspect both message and checksum. The expected mechanism is: The existing notes.txt is not overwritten by the default invocation. For the coding CCA project, add one near-miss that exposes expecting it to behave like a destructive restore command automatically. The answer is complete only when it says why the near-miss fails and how the corrected model transfers to a different project without relying on the original variable names.
Diagnostic route
- Model check: ask the learner to draw or list the exact rows, fields, references, paths or states involved.
- Boundary check: create the smallest input that triggers expecting it to behave like a destructive restore command automatically.
- Evidence check: separate a printed value from identity, ordering, ownership, type or repository state.
- Repair check: use the reversible procedure “Create a disposable modified file, run without force and inspect both message and checksum.” and record the first changed observation.
- Transfer check: repeat the rule in a second context and identify what remains invariant.
A parent does not need to know the final Git checkout-index syntax. For this chapter, useful prompts are: “What did you expect from Existing files are protected by default?”, “Which state changed first?”, “What evidence tests that prediction?”, and “Can the case exposing expecting it to behave like a destructive restore command automatically be made smaller?” The learner, not the parent, should supply the technical explanation.
Practice with an explained answer
Question. Build a tiny school website repository with staged HTML, an edited working copy and a disposable export folder. Include one ordinary case, one boundary and one deliberate failure caused by expecting it to behave like a destructive restore command automatically. Predict each result before using a tool, then report the first point where observation differs from prediction.
Answer guide. A strong response starts with the rule: checkout-index does not overwrite an existing destination file unless force is requested. It shows a trace, not only a final value. The ordinary case should demonstrate “The existing notes.txt is not overwritten by the default invocation.” The boundary must exercise the same mechanism at an edge, and the deliberate failure must be repaired with: Create a disposable modified file, run without force and inspect both message and checksum. Other data choices are valid when the evidence supports the same causal chain.
Decision and transfer
For Existing files are protected by default, separate the documented Git checkout-index mechanism from the project policy. State exactly what the technical contract guarantees, then state the project choice about validation, ordering, ownership, performance or recovery. Test whether the same distinction survives one transfer case, and keep stateful experiments disposable and backed up.
Previous chapter . Contents . Next chapter
The -f or –force option authorises replacement of existing destination files from indexed content. Treat that sentence as a testable model. A secure learner can point to the relevant input, name the operation, describe the resulting state and identify one observation that would prove the model incomplete.
The high-value mistake in this chapter is using force before checking whether the worktree contains uncommitted work. It matters because the output may look reasonable while the ownership, ordering, identity or safety rule is wrong. Save or diff valuable work, restrict the path list and verify in a disposable clone first.
For the –force permits overwriting chapter on Git checkout-index, use a two-column trace during a short Punggol home session. On the left, write the predicted state for this exact mechanism before the tool runs. On the right, record the observation that bears on using force before checking whether the worktree contains uncommitted work. Explain the earliest difference with one causal sentence, then repeat only the smallest changed case.
Core worked example
git diff -- notes.txt
git checkout-index --force -- notes.txtExplained result. After the safety review, the working file is replaced by the indexed version. Check the boundary as well as the happy path: ask what happens with an empty input, a duplicate or tied value, an unsupported type, a missing path, a NULL, or a second reference to the same object. Only the relevant boundary should be kept; the list is a prompt for judgment, not a demand to force every case into every example.
Four purposeful transfer cases
Case 1: school website repository. Transfer the rule using staged HTML, an edited working copy and a disposable export folder. State the input grain or object graph, the chapter boundary and the intended output before choosing syntax. Change only one variable, so a wrong prediction has a single plausible cause.
Reasoned route. Begin with “The -f or –force option authorises replacement of existing destination files from indexed content.” Apply this procedure: Save or diff valuable work, restrict the path list and verify in a disposable clone first. The expected mechanism is: After the safety review, the working file is replaced by the indexed version. For the school website repository, add one near-miss that exposes using force before checking whether the worktree contains uncommitted work. The answer is complete only when it says why the near-miss fails and how the corrected model transfers to a different project without relying on the original variable names.
Case 2: coding CCA project. Predict the rule using selected source files, generated output and a safe restoration test. State the input grain or object graph, the chapter boundary and the intended output before choosing syntax. Change only one variable, so a wrong prediction has a single plausible cause.
Reasoned route. Begin with “The -f or –force option authorises replacement of existing destination files from indexed content.” Apply this procedure: Save or diff valuable work, restrict the path list and verify in a disposable clone first. The expected mechanism is: After the safety review, the working file is replaced by the indexed version. For the coding CCA project, add one near-miss that exposes using force before checking whether the worktree contains uncommitted work. The answer is complete only when it says why the near-miss fails and how the corrected model transfers to a different project without relying on the original variable names.
Case 3: science data script. Contrast the rule using a staged parser, local experiment edits and a clean comparison copy. State the input grain or object graph, the chapter boundary and the intended output before choosing syntax. Change only one variable, so a wrong prediction has a single plausible cause.
Reasoned route. Begin with “The -f or –force option authorises replacement of existing destination files from indexed content.” Apply this procedure: Save or diff valuable work, restrict the path list and verify in a disposable clone first. The expected mechanism is: After the safety review, the working file is replaced by the indexed version. For the science data script, add one near-miss that exposes using force before checking whether the worktree contains uncommitted work. The answer is complete only when it says why the near-miss fails and how the corrected model transfers to a different project without relying on the original variable names.
Case 4: revision notes repository. Stress-test the rule using tracked Markdown, an index snapshot and an export prefix. State the input grain or object graph, the chapter boundary and the intended output before choosing syntax. Change only one variable, so a wrong prediction has a single plausible cause.
Reasoned route. Begin with “The -f or –force option authorises replacement of existing destination files from indexed content.” Apply this procedure: Save or diff valuable work, restrict the path list and verify in a disposable clone first. The expected mechanism is: After the safety review, the working file is replaced by the indexed version. For the revision notes repository, add one near-miss that exposes using force before checking whether the worktree contains uncommitted work. The answer is complete only when it says why the near-miss fails and how the corrected model transfers to a different project without relying on the original variable names.
Diagnostic route
- Model check: ask the learner to draw or list the exact rows, fields, references, paths or states involved.
- Boundary check: create the smallest input that triggers using force before checking whether the worktree contains uncommitted work.
- Evidence check: separate a printed value from identity, ordering, ownership, type or repository state.
- Repair check: use the reversible procedure “Save or diff valuable work, restrict the path list and verify in a disposable clone first.” and record the first changed observation.
- Transfer check: repeat the rule in a second context and identify what remains invariant.
A parent does not need to know the final Git checkout-index syntax. For this chapter, useful prompts are: “What did you expect from –force permits overwriting?”, “Which state changed first?”, “What evidence tests that prediction?”, and “Can the case exposing using force before checking whether the worktree contains uncommitted work be made smaller?” The learner, not the parent, should supply the technical explanation.
Practice with an explained answer
Question. Build a tiny coding CCA project with selected source files, generated output and a safe restoration test. Include one ordinary case, one boundary and one deliberate failure caused by using force before checking whether the worktree contains uncommitted work. Predict each result before using a tool, then report the first point where observation differs from prediction.
Answer guide. A strong response starts with the rule: The -f or –force option authorises replacement of existing destination files from indexed content. It shows a trace, not only a final value. The ordinary case should demonstrate “After the safety review, the working file is replaced by the indexed version.” The boundary must exercise the same mechanism at an edge, and the deliberate failure must be repaired with: Save or diff valuable work, restrict the path list and verify in a disposable clone first. Other data choices are valid when the evidence supports the same causal chain.
Decision and transfer
For –force permits overwriting, separate the documented Git checkout-index mechanism from the project policy. State exactly what the technical contract guarantees, then state the project choice about validation, ordering, ownership, performance or recovery. Test whether the same distinction survives one transfer case, and keep stateful experiments disposable and backed up.
Previous chapter . Contents . Next chapter
The -a or –all option selects every index entry except those hidden by skip-worktree unless explicitly overridden. Treat that sentence as a testable model. A secure learner can point to the relevant input, name the operation, describe the resulting state and identify one observation that would prove the model incomplete.
The high-value mistake in this chapter is combining –all with explicit filenames or assuming it means all repository objects. It matters because the output may look reasonable while the ownership, ordering, identity or safety rule is wrong. Choose either broad selection or named paths and inspect git ls-files first.
For the –all selects index entries chapter on Git checkout-index, use a two-column trace during a short Punggol home session. On the left, write the predicted state for this exact mechanism before the tool runs. On the right, record the observation that bears on combining –all with explicit filenames or assuming it means all repository objects. Explain the earliest difference with one causal sentence, then repeat only the smallest changed case.
Core worked example
git ls-files
git checkout-index --allExplained result. Every eligible indexed path is considered for copying, subject to overwrite protection. Check the boundary as well as the happy path: ask what happens with an empty input, a duplicate or tied value, an unsupported type, a missing path, a NULL, or a second reference to the same object. Only the relevant boundary should be kept; the list is a prompt for judgment, not a demand to force every case into every example.
Four purposeful transfer cases
Case 1: science data script. Predict the rule using a staged parser, local experiment edits and a clean comparison copy. State the input grain or object graph, the chapter boundary and the intended output before choosing syntax. Change only one variable, so a wrong prediction has a single plausible cause.
Reasoned route. Begin with “The -a or –all option selects every index entry except those hidden by skip-worktree unless explicitly overridden.” Apply this procedure: Choose either broad selection or named paths and inspect git ls-files first. The expected mechanism is: Every eligible indexed path is considered for copying, subject to overwrite protection. For the science data script, add one near-miss that exposes combining –all with explicit filenames or assuming it means all repository objects. The answer is complete only when it says why the near-miss fails and how the corrected model transfers to a different project without relying on the original variable names.
Case 2: revision notes repository. Contrast the rule using tracked Markdown, an index snapshot and an export prefix. State the input grain or object graph, the chapter boundary and the intended output before choosing syntax. Change only one variable, so a wrong prediction has a single plausible cause.
Reasoned route. Begin with “The -a or –all option selects every index entry except those hidden by skip-worktree unless explicitly overridden.” Apply this procedure: Choose either broad selection or named paths and inspect git ls-files first. The expected mechanism is: Every eligible indexed path is considered for copying, subject to overwrite protection. For the revision notes repository, add one near-miss that exposes combining –all with explicit filenames or assuming it means all repository objects. The answer is complete only when it says why the near-miss fails and how the corrected model transfers to a different project without relying on the original variable names.
Case 3: team merge lab. Stress-test the rule using base, ours and theirs stages for one conflicted file. State the input grain or object graph, the chapter boundary and the intended output before choosing syntax. Change only one variable, so a wrong prediction has a single plausible cause.
Reasoned route. Begin with “The -a or –all option selects every index entry except those hidden by skip-worktree unless explicitly overridden.” Apply this procedure: Choose either broad selection or named paths and inspect git ls-files first. The expected mechanism is: Every eligible indexed path is considered for copying, subject to overwrite protection. For the team merge lab, add one near-miss that exposes combining –all with explicit filenames or assuming it means all repository objects. The answer is complete only when it says why the near-miss fails and how the corrected model transfers to a different project without relying on the original variable names.
Case 4: release bundle. Explain the rule using a prepared index, a clean destination and a verification manifest. State the input grain or object graph, the chapter boundary and the intended output before choosing syntax. Change only one variable, so a wrong prediction has a single plausible cause.
Reasoned route. Begin with “The -a or –all option selects every index entry except those hidden by skip-worktree unless explicitly overridden.” Apply this procedure: Choose either broad selection or named paths and inspect git ls-files first. The expected mechanism is: Every eligible indexed path is considered for copying, subject to overwrite protection. For the release bundle, add one near-miss that exposes combining –all with explicit filenames or assuming it means all repository objects. The answer is complete only when it says why the near-miss fails and how the corrected model transfers to a different project without relying on the original variable names.
Diagnostic route
- Model check: ask the learner to draw or list the exact rows, fields, references, paths or states involved.
- Boundary check: create the smallest input that triggers combining –all with explicit filenames or assuming it means all repository objects.
- Evidence check: separate a printed value from identity, ordering, ownership, type or repository state.
- Repair check: use the reversible procedure “Choose either broad selection or named paths and inspect git ls-files first.” and record the first changed observation.
- Transfer check: repeat the rule in a second context and identify what remains invariant.
A parent does not need to know the final Git checkout-index syntax. For this chapter, useful prompts are: “What did you expect from –all selects index entries?”, “Which state changed first?”, “What evidence tests that prediction?”, and “Can the case exposing combining –all with explicit filenames or assuming it means all repository objects be made smaller?” The learner, not the parent, should supply the technical explanation.
Practice with an explained answer
Question. Build a tiny science data script with a staged parser, local experiment edits and a clean comparison copy. Include one ordinary case, one boundary and one deliberate failure caused by combining –all with explicit filenames or assuming it means all repository objects. Predict each result before using a tool, then report the first point where observation differs from prediction.
Answer guide. A strong response starts with the rule: The -a or –all option selects every index entry except those hidden by skip-worktree unless explicitly overridden. It shows a trace, not only a final value. The ordinary case should demonstrate “Every eligible indexed path is considered for copying, subject to overwrite protection.” The boundary must exercise the same mechanism at an edge, and the deliberate failure must be repaired with: Choose either broad selection or named paths and inspect git ls-files first. Other data choices are valid when the evidence supports the same causal chain.
Decision and transfer
For –all selects index entries, separate the documented Git checkout-index mechanism from the project policy. State exactly what the technical contract guarantees, then state the project choice about validation, ordering, ownership, performance or recovery. Test whether the same distinction survives one transfer case, and keep stateful experiments disposable and backed up.
Previous chapter . Contents . Next chapter
The double dash ends option parsing so a tracked name beginning with a dash cannot become a checkout-index flag. Treat that sentence as a testable model. A secure learner can point to the relevant input, name the operation, describe the resulting state and identify one observation that would prove the model incomplete.
The high-value mistake in this chapter is interpolating filenames directly into command options. It matters because the output may look reasonable while the ownership, ordering, identity or safety rule is wrong. Use — before path arguments and NUL-delimited input for generated path lists.
For the Explicit paths need an option boundary chapter on Git checkout-index, use a two-column trace during a short Punggol home session. On the left, write the predicted state for this exact mechanism before the tool runs. On the right, record the observation that bears on interpolating filenames directly into command options. Explain the earliest difference with one causal sentence, then repeat only the smallest changed case.
Core worked example
git checkout-index -- '-a'Explained result. The token -a is treated as a path rather than the –all option. Check the boundary as well as the happy path: ask what happens with an empty input, a duplicate or tied value, an unsupported type, a missing path, a NULL, or a second reference to the same object. Only the relevant boundary should be kept; the list is a prompt for judgment, not a demand to force every case into every example.
Four purposeful transfer cases
Case 1: team merge lab. Contrast the rule using base, ours and theirs stages for one conflicted file. State the input grain or object graph, the chapter boundary and the intended output before choosing syntax. Change only one variable, so a wrong prediction has a single plausible cause.
Reasoned route. Begin with “The double dash ends option parsing so a tracked name beginning with a dash cannot become a checkout-index flag.” Apply this procedure: Use — before path arguments and NUL-delimited input for generated path lists. The expected mechanism is: The token -a is treated as a path rather than the –all option. For the team merge lab, add one near-miss that exposes interpolating filenames directly into command options. The answer is complete only when it says why the near-miss fails and how the corrected model transfers to a different project without relying on the original variable names.
Case 2: release bundle. Stress-test the rule using a prepared index, a clean destination and a verification manifest. State the input grain or object graph, the chapter boundary and the intended output before choosing syntax. Change only one variable, so a wrong prediction has a single plausible cause.
Reasoned route. Begin with “The double dash ends option parsing so a tracked name beginning with a dash cannot become a checkout-index flag.” Apply this procedure: Use — before path arguments and NUL-delimited input for generated path lists. The expected mechanism is: The token -a is treated as a path rather than the –all option. For the release bundle, add one near-miss that exposes interpolating filenames directly into command options. The answer is complete only when it says why the near-miss fails and how the corrected model transfers to a different project without relying on the original variable names.
Case 3: filename safety test. Explain the rule using spaces, leading dashes and NUL-delimited path input. State the input grain or object graph, the chapter boundary and the intended output before choosing syntax. Change only one variable, so a wrong prediction has a single plausible cause.
Reasoned route. Begin with “The double dash ends option parsing so a tracked name beginning with a dash cannot become a checkout-index flag.” Apply this procedure: Use — before path arguments and NUL-delimited input for generated path lists. The expected mechanism is: The token -a is treated as a path rather than the –all option. For the filename safety test, add one near-miss that exposes interpolating filenames directly into command options. The answer is complete only when it says why the near-miss fails and how the corrected model transfers to a different project without relying on the original variable names.
Case 4: recovery rehearsal. Transfer the rule using a temporary clone, known staged content and checksum evidence. State the input grain or object graph, the chapter boundary and the intended output before choosing syntax. Change only one variable, so a wrong prediction has a single plausible cause.
Reasoned route. Begin with “The double dash ends option parsing so a tracked name beginning with a dash cannot become a checkout-index flag.” Apply this procedure: Use — before path arguments and NUL-delimited input for generated path lists. The expected mechanism is: The token -a is treated as a path rather than the –all option. For the recovery rehearsal, add one near-miss that exposes interpolating filenames directly into command options. The answer is complete only when it says why the near-miss fails and how the corrected model transfers to a different project without relying on the original variable names.
Diagnostic route
- Model check: ask the learner to draw or list the exact rows, fields, references, paths or states involved.
- Boundary check: create the smallest input that triggers interpolating filenames directly into command options.
- Evidence check: separate a printed value from identity, ordering, ownership, type or repository state.
- Repair check: use the reversible procedure “Use — before path arguments and NUL-delimited input for generated path lists.” and record the first changed observation.
- Transfer check: repeat the rule in a second context and identify what remains invariant.
A parent does not need to know the final Git checkout-index syntax. For this chapter, useful prompts are: “What did you expect from Explicit paths need an option boundary?”, “Which state changed first?”, “What evidence tests that prediction?”, and “Can the case exposing interpolating filenames directly into command options be made smaller?” The learner, not the parent, should supply the technical explanation.
Practice with an explained answer
Question. Build a tiny revision notes repository with tracked Markdown, an index snapshot and an export prefix. Include one ordinary case, one boundary and one deliberate failure caused by interpolating filenames directly into command options. Predict each result before using a tool, then report the first point where observation differs from prediction.
Answer guide. A strong response starts with the rule: The double dash ends option parsing so a tracked name beginning with a dash cannot become a checkout-index flag. It shows a trace, not only a final value. The ordinary case should demonstrate “The token -a is treated as a path rather than the –all option.” The boundary must exercise the same mechanism at an edge, and the deliberate failure must be repaired with: Use — before path arguments and NUL-delimited input for generated path lists. Other data choices are valid when the evidence supports the same causal chain.
Decision and transfer
For Explicit paths need an option boundary, separate the documented Git checkout-index mechanism from the project policy. State exactly what the technical contract guarantees, then state the project choice about validation, ordering, ownership, performance or recovery. Test whether the same distinction survives one transfer case, and keep stateful experiments disposable and backed up.
Previous chapter . Contents . Next chapter
The -n or –no-create option skips new destinations and operates only on files already present. Treat that sentence as a testable model. A secure learner can point to the relevant input, name the operation, describe the resulting state and identify one observation that would prove the model incomplete.
The high-value mistake in this chapter is using no-create as a dry-run flag even though it can still refresh existing files. It matters because the output may look reasonable while the ownership, ordering, identity or safety rule is wrong. Test one present and one absent tracked path and inspect both afterward.
For the –no-create refreshes only existing paths chapter on Git checkout-index, use a two-column trace during a short Punggol home session. On the left, write the predicted state for this exact mechanism before the tool runs. On the right, record the observation that bears on using no-create as a dry-run flag even though it can still refresh existing files. Explain the earliest difference with one causal sentence, then repeat only the smallest changed case.
Core worked example
git checkout-index --no-create --force --allExplained result. Existing tracked files may be refreshed, while missing files are not created. Check the boundary as well as the happy path: ask what happens with an empty input, a duplicate or tied value, an unsupported type, a missing path, a NULL, or a second reference to the same object. Only the relevant boundary should be kept; the list is a prompt for judgment, not a demand to force every case into every example.
Four purposeful transfer cases
Case 1: filename safety test. Stress-test the rule using spaces, leading dashes and NUL-delimited path input. State the input grain or object graph, the chapter boundary and the intended output before choosing syntax. Change only one variable, so a wrong prediction has a single plausible cause.
Reasoned route. Begin with “The -n or –no-create option skips new destinations and operates only on files already present.” Apply this procedure: Test one present and one absent tracked path and inspect both afterward. The expected mechanism is: Existing tracked files may be refreshed, while missing files are not created. For the filename safety test, add one near-miss that exposes using no-create as a dry-run flag even though it can still refresh existing files. The answer is complete only when it says why the near-miss fails and how the corrected model transfers to a different project without relying on the original variable names.
Case 2: recovery rehearsal. Explain the rule using a temporary clone, known staged content and checksum evidence. State the input grain or object graph, the chapter boundary and the intended output before choosing syntax. Change only one variable, so a wrong prediction has a single plausible cause.
Reasoned route. Begin with “The -n or –no-create option skips new destinations and operates only on files already present.” Apply this procedure: Test one present and one absent tracked path and inspect both afterward. The expected mechanism is: Existing tracked files may be refreshed, while missing files are not created. For the recovery rehearsal, add one near-miss that exposes using no-create as a dry-run flag even though it can still refresh existing files. The answer is complete only when it says why the near-miss fails and how the corrected model transfers to a different project without relying on the original variable names.
Case 3: school website repository. Transfer the rule using staged HTML, an edited working copy and a disposable export folder. State the input grain or object graph, the chapter boundary and the intended output before choosing syntax. Change only one variable, so a wrong prediction has a single plausible cause.
Reasoned route. Begin with “The -n or –no-create option skips new destinations and operates only on files already present.” Apply this procedure: Test one present and one absent tracked path and inspect both afterward. The expected mechanism is: Existing tracked files may be refreshed, while missing files are not created. For the school website repository, add one near-miss that exposes using no-create as a dry-run flag even though it can still refresh existing files. The answer is complete only when it says why the near-miss fails and how the corrected model transfers to a different project without relying on the original variable names.
Case 4: coding CCA project. Predict the rule using selected source files, generated output and a safe restoration test. State the input grain or object graph, the chapter boundary and the intended output before choosing syntax. Change only one variable, so a wrong prediction has a single plausible cause.
Reasoned route. Begin with “The -n or –no-create option skips new destinations and operates only on files already present.” Apply this procedure: Test one present and one absent tracked path and inspect both afterward. The expected mechanism is: Existing tracked files may be refreshed, while missing files are not created. For the coding CCA project, add one near-miss that exposes using no-create as a dry-run flag even though it can still refresh existing files. The answer is complete only when it says why the near-miss fails and how the corrected model transfers to a different project without relying on the original variable names.
Diagnostic route
- Model check: ask the learner to draw or list the exact rows, fields, references, paths or states involved.
- Boundary check: create the smallest input that triggers using no-create as a dry-run flag even though it can still refresh existing files.
- Evidence check: separate a printed value from identity, ordering, ownership, type or repository state.
- Repair check: use the reversible procedure “Test one present and one absent tracked path and inspect both afterward.” and record the first changed observation.
- Transfer check: repeat the rule in a second context and identify what remains invariant.
A parent does not need to know the final Git checkout-index syntax. For this chapter, useful prompts are: “What did you expect from –no-create refreshes only existing paths?”, “Which state changed first?”, “What evidence tests that prediction?”, and “Can the case exposing using no-create as a dry-run flag even though it can still refresh existing files be made smaller?” The learner, not the parent, should supply the technical explanation.
Practice with an explained answer
Question. Build a tiny team merge lab with base, ours and theirs stages for one conflicted file. Include one ordinary case, one boundary and one deliberate failure caused by using no-create as a dry-run flag even though it can still refresh existing files. Predict each result before using a tool, then report the first point where observation differs from prediction.
Answer guide. A strong response starts with the rule: The -n or –no-create option skips new destinations and operates only on files already present. It shows a trace, not only a final value. The ordinary case should demonstrate “Existing tracked files may be refreshed, while missing files are not created.” The boundary must exercise the same mechanism at an edge, and the deliberate failure must be repaired with: Test one present and one absent tracked path and inspect both afterward. Other data choices are valid when the evidence supports the same causal chain.
Decision and transfer
For –no-create refreshes only existing paths, separate the documented Git checkout-index mechanism from the project policy. State exactly what the technical contract guarantees, then state the project choice about validation, ordering, ownership, performance or recovery. Test whether the same distinction survives one transfer case, and keep stateful experiments disposable and backed up.
Previous chapter . Contents . Next chapter
The -u or –index option refreshes stat information for entries that are checked out. Treat that sentence as a testable model. A secure learner can point to the relevant input, name the operation, describe the resulting state and identify one observation that would prove the model incomplete.
The high-value mistake in this chapter is describing it as staging new file content from the working tree. It matters because the output may look reasonable while the ownership, ordering, identity or safety rule is wrong. Compare git diff and index metadata; use git add when content itself must enter the index.
For the –index updates stat information chapter on Git checkout-index, use a two-column trace during a short Punggol home session. On the left, write the predicted state for this exact mechanism before the tool runs. On the right, record the observation that bears on describing it as staging new file content from the working tree. Explain the earliest difference with one causal sentence, then repeat only the smallest changed case.
Core worked example
git checkout-index --index --force -- notes.txtExplained result. The indexed blob remains the source while stat information is updated for the checkout. Check the boundary as well as the happy path: ask what happens with an empty input, a duplicate or tied value, an unsupported type, a missing path, a NULL, or a second reference to the same object. Only the relevant boundary should be kept; the list is a prompt for judgment, not a demand to force every case into every example.
Four purposeful transfer cases
Case 1: school website repository. Explain the rule using staged HTML, an edited working copy and a disposable export folder. State the input grain or object graph, the chapter boundary and the intended output before choosing syntax. Change only one variable, so a wrong prediction has a single plausible cause.
Reasoned route. Begin with “The -u or –index option refreshes stat information for entries that are checked out.” Apply this procedure: Compare git diff and index metadata; use git add when content itself must enter the index. The expected mechanism is: The indexed blob remains the source while stat information is updated for the checkout. For the school website repository, add one near-miss that exposes describing it as staging new file content from the working tree. The answer is complete only when it says why the near-miss fails and how the corrected model transfers to a different project without relying on the original variable names.
Case 2: coding CCA project. Transfer the rule using selected source files, generated output and a safe restoration test. State the input grain or object graph, the chapter boundary and the intended output before choosing syntax. Change only one variable, so a wrong prediction has a single plausible cause.
Reasoned route. Begin with “The -u or –index option refreshes stat information for entries that are checked out.” Apply this procedure: Compare git diff and index metadata; use git add when content itself must enter the index. The expected mechanism is: The indexed blob remains the source while stat information is updated for the checkout. For the coding CCA project, add one near-miss that exposes describing it as staging new file content from the working tree. The answer is complete only when it says why the near-miss fails and how the corrected model transfers to a different project without relying on the original variable names.
Case 3: science data script. Predict the rule using a staged parser, local experiment edits and a clean comparison copy. State the input grain or object graph, the chapter boundary and the intended output before choosing syntax. Change only one variable, so a wrong prediction has a single plausible cause.
Reasoned route. Begin with “The -u or –index option refreshes stat information for entries that are checked out.” Apply this procedure: Compare git diff and index metadata; use git add when content itself must enter the index. The expected mechanism is: The indexed blob remains the source while stat information is updated for the checkout. For the science data script, add one near-miss that exposes describing it as staging new file content from the working tree. The answer is complete only when it says why the near-miss fails and how the corrected model transfers to a different project without relying on the original variable names.
Case 4: revision notes repository. Contrast the rule using tracked Markdown, an index snapshot and an export prefix. State the input grain or object graph, the chapter boundary and the intended output before choosing syntax. Change only one variable, so a wrong prediction has a single plausible cause.
Reasoned route. Begin with “The -u or –index option refreshes stat information for entries that are checked out.” Apply this procedure: Compare git diff and index metadata; use git add when content itself must enter the index. The expected mechanism is: The indexed blob remains the source while stat information is updated for the checkout. For the revision notes repository, add one near-miss that exposes describing it as staging new file content from the working tree. The answer is complete only when it says why the near-miss fails and how the corrected model transfers to a different project without relying on the original variable names.
Diagnostic route
- Model check: ask the learner to draw or list the exact rows, fields, references, paths or states involved.
- Boundary check: create the smallest input that triggers describing it as staging new file content from the working tree.
- Evidence check: separate a printed value from identity, ordering, ownership, type or repository state.
- Repair check: use the reversible procedure “Compare git diff and index metadata; use git add when content itself must enter the index.” and record the first changed observation.
- Transfer check: repeat the rule in a second context and identify what remains invariant.
A parent does not need to know the final Git checkout-index syntax. For this chapter, useful prompts are: “What did you expect from –index updates stat information?”, “Which state changed first?”, “What evidence tests that prediction?”, and “Can the case exposing describing it as staging new file content from the working tree be made smaller?” The learner, not the parent, should supply the technical explanation.
Practice with an explained answer
Question. Build a tiny release bundle with a prepared index, a clean destination and a verification manifest. Include one ordinary case, one boundary and one deliberate failure caused by describing it as staging new file content from the working tree. Predict each result before using a tool, then report the first point where observation differs from prediction.
Answer guide. A strong response starts with the rule: The -u or –index option refreshes stat information for entries that are checked out. It shows a trace, not only a final value. The ordinary case should demonstrate “The indexed blob remains the source while stat information is updated for the checkout.” The boundary must exercise the same mechanism at an edge, and the deliberate failure must be repaired with: Compare git diff and index metadata; use git add when content itself must enter the index. Other data choices are valid when the evidence supports the same causal chain.
Decision and transfer
For –index updates stat information, separate the documented Git checkout-index mechanism from the project policy. State exactly what the technical contract guarantees, then state the project choice about validation, ordering, ownership, performance or recovery. Test whether the same distinction survives one transfer case, and keep stateful experiments disposable and backed up.
Previous chapter . Contents . Next chapter
The -q or –quiet option suppresses complaints when files exist or are absent from the index. Treat that sentence as a testable model. A secure learner can point to the relevant input, name the operation, describe the resulting state and identify one observation that would prove the model incomplete.
The high-value mistake in this chapter is treating silence as proof that every requested path was written. It matters because the output may look reasonable while the ownership, ordering, identity or safety rule is wrong. Verify destination hashes and exit status rather than relying on terminal output.
For the –quiet changes messages, not safety chapter on Git checkout-index, use a two-column trace during a short Punggol home session. On the left, write the predicted state for this exact mechanism before the tool runs. On the right, record the observation that bears on treating silence as proof that every requested path was written. Explain the earliest difference with one causal sentence, then repeat only the smallest changed case.
Core worked example
git checkout-index --quiet -- missing.txt
printf '%s
' $?Explained result. Reduced output does not convert a missing index entry into a copied file. Check the boundary as well as the happy path: ask what happens with an empty input, a duplicate or tied value, an unsupported type, a missing path, a NULL, or a second reference to the same object. Only the relevant boundary should be kept; the list is a prompt for judgment, not a demand to force every case into every example.
Four purposeful transfer cases
Case 1: science data script. Transfer the rule using a staged parser, local experiment edits and a clean comparison copy. State the input grain or object graph, the chapter boundary and the intended output before choosing syntax. Change only one variable, so a wrong prediction has a single plausible cause.
Reasoned route. Begin with “The -q or –quiet option suppresses complaints when files exist or are absent from the index.” Apply this procedure: Verify destination hashes and exit status rather than relying on terminal output. The expected mechanism is: Reduced output does not convert a missing index entry into a copied file. For the science data script, add one near-miss that exposes treating silence as proof that every requested path was written. The answer is complete only when it says why the near-miss fails and how the corrected model transfers to a different project without relying on the original variable names.
Case 2: revision notes repository. Predict the rule using tracked Markdown, an index snapshot and an export prefix. State the input grain or object graph, the chapter boundary and the intended output before choosing syntax. Change only one variable, so a wrong prediction has a single plausible cause.
Reasoned route. Begin with “The -q or –quiet option suppresses complaints when files exist or are absent from the index.” Apply this procedure: Verify destination hashes and exit status rather than relying on terminal output. The expected mechanism is: Reduced output does not convert a missing index entry into a copied file. For the revision notes repository, add one near-miss that exposes treating silence as proof that every requested path was written. The answer is complete only when it says why the near-miss fails and how the corrected model transfers to a different project without relying on the original variable names.
Case 3: team merge lab. Contrast the rule using base, ours and theirs stages for one conflicted file. State the input grain or object graph, the chapter boundary and the intended output before choosing syntax. Change only one variable, so a wrong prediction has a single plausible cause.
Reasoned route. Begin with “The -q or –quiet option suppresses complaints when files exist or are absent from the index.” Apply this procedure: Verify destination hashes and exit status rather than relying on terminal output. The expected mechanism is: Reduced output does not convert a missing index entry into a copied file. For the team merge lab, add one near-miss that exposes treating silence as proof that every requested path was written. The answer is complete only when it says why the near-miss fails and how the corrected model transfers to a different project without relying on the original variable names.
Case 4: release bundle. Stress-test the rule using a prepared index, a clean destination and a verification manifest. State the input grain or object graph, the chapter boundary and the intended output before choosing syntax. Change only one variable, so a wrong prediction has a single plausible cause.
Reasoned route. Begin with “The -q or –quiet option suppresses complaints when files exist or are absent from the index.” Apply this procedure: Verify destination hashes and exit status rather than relying on terminal output. The expected mechanism is: Reduced output does not convert a missing index entry into a copied file. For the release bundle, add one near-miss that exposes treating silence as proof that every requested path was written. The answer is complete only when it says why the near-miss fails and how the corrected model transfers to a different project without relying on the original variable names.
Diagnostic route
- Model check: ask the learner to draw or list the exact rows, fields, references, paths or states involved.
- Boundary check: create the smallest input that triggers treating silence as proof that every requested path was written.
- Evidence check: separate a printed value from identity, ordering, ownership, type or repository state.
- Repair check: use the reversible procedure “Verify destination hashes and exit status rather than relying on terminal output.” and record the first changed observation.
- Transfer check: repeat the rule in a second context and identify what remains invariant.
A parent does not need to know the final Git checkout-index syntax. For this chapter, useful prompts are: “What did you expect from –quiet changes messages, not safety?”, “Which state changed first?”, “What evidence tests that prediction?”, and “Can the case exposing treating silence as proof that every requested path was written be made smaller?” The learner, not the parent, should supply the technical explanation.
Practice with an explained answer
Question. Build a tiny filename safety test with spaces, leading dashes and NUL-delimited path input. Include one ordinary case, one boundary and one deliberate failure caused by treating silence as proof that every requested path was written. Predict each result before using a tool, then report the first point where observation differs from prediction.
Answer guide. A strong response starts with the rule: The -q or –quiet option suppresses complaints when files exist or are absent from the index. It shows a trace, not only a final value. The ordinary case should demonstrate “Reduced output does not convert a missing index entry into a copied file.” The boundary must exercise the same mechanism at an edge, and the deliberate failure must be repaired with: Verify destination hashes and exit status rather than relying on terminal output. Other data choices are valid when the evidence supports the same causal chain.
Decision and transfer
For –quiet changes messages, not safety, separate the documented Git checkout-index mechanism from the project policy. State exactly what the technical contract guarantees, then state the project choice about validation, ordering, ownership, performance or recovery. Test whether the same distinction survives one transfer case, and keep stateful experiments disposable and backed up.
Previous chapter . Contents . Next chapter
CHAPTER 11 OF 20 . Handle boundaries
11. –prefix prepends a literal destination string
The prefix string is placed before each indexed path when files are created. Treat that sentence as a testable model. A secure learner can point to the relevant input, name the operation, describe the resulting state and identify one observation that would prove the model incomplete.
The high-value mistake in this chapter is assuming prefix always names a directory even when its final slash is missing. It matters because the output may look reasonable while the ownership, ordering, identity or safety rule is wrong. Construct and validate the prefix explicitly, including the trailing directory separator.
For the –prefix prepends a literal destination string chapter on Git checkout-index, use a two-column trace during a short Punggol home session. On the left, write the predicted state for this exact mechanism before the tool runs. On the right, record the observation that bears on assuming prefix always names a directory even when its final slash is missing. Explain the earliest difference with one causal sentence, then repeat only the smallest changed case.
Core worked example
mkdir -p ../export
git checkout-index --prefix=../export/ --allExplained result. Indexed paths are recreated under ../export because the prefix ends with a slash. Check the boundary as well as the happy path: ask what happens with an empty input, a duplicate or tied value, an unsupported type, a missing path, a NULL, or a second reference to the same object. Only the relevant boundary should be kept; the list is a prompt for judgment, not a demand to force every case into every example.
Four purposeful transfer cases
Case 1: team merge lab. Predict the rule using base, ours and theirs stages for one conflicted file. State the input grain or object graph, the chapter boundary and the intended output before choosing syntax. Change only one variable, so a wrong prediction has a single plausible cause.
Reasoned route. Begin with “The prefix string is placed before each indexed path when files are created.” Apply this procedure: Construct and validate the prefix explicitly, including the trailing directory separator. The expected mechanism is: Indexed paths are recreated under ../export because the prefix ends with a slash. For the team merge lab, add one near-miss that exposes assuming prefix always names a directory even when its final slash is missing. The answer is complete only when it says why the near-miss fails and how the corrected model transfers to a different project without relying on the original variable names.
Case 2: release bundle. Contrast the rule using a prepared index, a clean destination and a verification manifest. State the input grain or object graph, the chapter boundary and the intended output before choosing syntax. Change only one variable, so a wrong prediction has a single plausible cause.
Reasoned route. Begin with “The prefix string is placed before each indexed path when files are created.” Apply this procedure: Construct and validate the prefix explicitly, including the trailing directory separator. The expected mechanism is: Indexed paths are recreated under ../export because the prefix ends with a slash. For the release bundle, add one near-miss that exposes assuming prefix always names a directory even when its final slash is missing. The answer is complete only when it says why the near-miss fails and how the corrected model transfers to a different project without relying on the original variable names.
Case 3: filename safety test. Stress-test the rule using spaces, leading dashes and NUL-delimited path input. State the input grain or object graph, the chapter boundary and the intended output before choosing syntax. Change only one variable, so a wrong prediction has a single plausible cause.
Reasoned route. Begin with “The prefix string is placed before each indexed path when files are created.” Apply this procedure: Construct and validate the prefix explicitly, including the trailing directory separator. The expected mechanism is: Indexed paths are recreated under ../export because the prefix ends with a slash. For the filename safety test, add one near-miss that exposes assuming prefix always names a directory even when its final slash is missing. The answer is complete only when it says why the near-miss fails and how the corrected model transfers to a different project without relying on the original variable names.
Case 4: recovery rehearsal. Explain the rule using a temporary clone, known staged content and checksum evidence. State the input grain or object graph, the chapter boundary and the intended output before choosing syntax. Change only one variable, so a wrong prediction has a single plausible cause.
Reasoned route. Begin with “The prefix string is placed before each indexed path when files are created.” Apply this procedure: Construct and validate the prefix explicitly, including the trailing directory separator. The expected mechanism is: Indexed paths are recreated under ../export because the prefix ends with a slash. For the recovery rehearsal, add one near-miss that exposes assuming prefix always names a directory even when its final slash is missing. The answer is complete only when it says why the near-miss fails and how the corrected model transfers to a different project without relying on the original variable names.
Diagnostic route
- Model check: ask the learner to draw or list the exact rows, fields, references, paths or states involved.
- Boundary check: create the smallest input that triggers assuming prefix always names a directory even when its final slash is missing.
- Evidence check: separate a printed value from identity, ordering, ownership, type or repository state.
- Repair check: use the reversible procedure “Construct and validate the prefix explicitly, including the trailing directory separator.” and record the first changed observation.
- Transfer check: repeat the rule in a second context and identify what remains invariant.
A parent does not need to know the final Git checkout-index syntax. For this chapter, useful prompts are: “What did you expect from –prefix prepends a literal destination string?”, “Which state changed first?”, “What evidence tests that prediction?”, and “Can the case exposing assuming prefix always names a directory even when its final slash is missing be made smaller?” The learner, not the parent, should supply the technical explanation.
Practice with an explained answer
Question. Build a tiny recovery rehearsal with a temporary clone, known staged content and checksum evidence. Include one ordinary case, one boundary and one deliberate failure caused by assuming prefix always names a directory even when its final slash is missing. Predict each result before using a tool, then report the first point where observation differs from prediction.
Answer guide. A strong response starts with the rule: The prefix string is placed before each indexed path when files are created. It shows a trace, not only a final value. The ordinary case should demonstrate “Indexed paths are recreated under ../export because the prefix ends with a slash.” The boundary must exercise the same mechanism at an edge, and the deliberate failure must be repaired with: Construct and validate the prefix explicitly, including the trailing directory separator. Other data choices are valid when the evidence supports the same causal chain.
Decision and transfer
For –prefix prepends a literal destination string, separate the documented Git checkout-index mechanism from the project policy. State exactly what the technical contract guarantees, then state the project choice about validation, ordering, ownership, performance or recovery. Test whether the same distinction survives one transfer case, and keep stateful experiments disposable and backed up.
Previous chapter . Contents . Next chapter
Because prefixing is literal, –prefix=.copy- can create .copy-path rather than a directory tree. Treat that sentence as a testable model. A secure learner can point to the relevant input, name the operation, describe the resulting state and identify one observation that would prove the model incomplete.
The high-value mistake in this chapter is reviewing only the prefix word and not the final destination path. It matters because the output may look reasonable while the ownership, ordering, identity or safety rule is wrong. Compute one example destination string before exporting the full index.
For the A missing trailing slash changes names chapter on Git checkout-index, use a two-column trace during a short Punggol home session. On the left, write the predicted state for this exact mechanism before the tool runs. On the right, record the observation that bears on reviewing only the prefix word and not the final destination path. Explain the earliest difference with one causal sentence, then repeat only the smallest changed case.
Core worked example
git checkout-index --prefix=.copy- -- notes.txtExplained result. The output name is .copy-notes.txt, demonstrating literal concatenation. Check the boundary as well as the happy path: ask what happens with an empty input, a duplicate or tied value, an unsupported type, a missing path, a NULL, or a second reference to the same object. Only the relevant boundary should be kept; the list is a prompt for judgment, not a demand to force every case into every example.
Four purposeful transfer cases
Case 1: filename safety test. Contrast the rule using spaces, leading dashes and NUL-delimited path input. State the input grain or object graph, the chapter boundary and the intended output before choosing syntax. Change only one variable, so a wrong prediction has a single plausible cause.
Reasoned route. Begin with “Because prefixing is literal, –prefix=.copy- can create .copy-path rather than a directory tree.” Apply this procedure: Compute one example destination string before exporting the full index. The expected mechanism is: The output name is .copy-notes.txt, demonstrating literal concatenation. For the filename safety test, add one near-miss that exposes reviewing only the prefix word and not the final destination path. The answer is complete only when it says why the near-miss fails and how the corrected model transfers to a different project without relying on the original variable names.
Case 2: recovery rehearsal. Stress-test the rule using a temporary clone, known staged content and checksum evidence. State the input grain or object graph, the chapter boundary and the intended output before choosing syntax. Change only one variable, so a wrong prediction has a single plausible cause.
Reasoned route. Begin with “Because prefixing is literal, –prefix=.copy- can create .copy-path rather than a directory tree.” Apply this procedure: Compute one example destination string before exporting the full index. The expected mechanism is: The output name is .copy-notes.txt, demonstrating literal concatenation. For the recovery rehearsal, add one near-miss that exposes reviewing only the prefix word and not the final destination path. The answer is complete only when it says why the near-miss fails and how the corrected model transfers to a different project without relying on the original variable names.
Case 3: school website repository. Explain the rule using staged HTML, an edited working copy and a disposable export folder. State the input grain or object graph, the chapter boundary and the intended output before choosing syntax. Change only one variable, so a wrong prediction has a single plausible cause.
Reasoned route. Begin with “Because prefixing is literal, –prefix=.copy- can create .copy-path rather than a directory tree.” Apply this procedure: Compute one example destination string before exporting the full index. The expected mechanism is: The output name is .copy-notes.txt, demonstrating literal concatenation. For the school website repository, add one near-miss that exposes reviewing only the prefix word and not the final destination path. The answer is complete only when it says why the near-miss fails and how the corrected model transfers to a different project without relying on the original variable names.
Case 4: coding CCA project. Transfer the rule using selected source files, generated output and a safe restoration test. State the input grain or object graph, the chapter boundary and the intended output before choosing syntax. Change only one variable, so a wrong prediction has a single plausible cause.
Reasoned route. Begin with “Because prefixing is literal, –prefix=.copy- can create .copy-path rather than a directory tree.” Apply this procedure: Compute one example destination string before exporting the full index. The expected mechanism is: The output name is .copy-notes.txt, demonstrating literal concatenation. For the coding CCA project, add one near-miss that exposes reviewing only the prefix word and not the final destination path. The answer is complete only when it says why the near-miss fails and how the corrected model transfers to a different project without relying on the original variable names.
Diagnostic route
- Model check: ask the learner to draw or list the exact rows, fields, references, paths or states involved.
- Boundary check: create the smallest input that triggers reviewing only the prefix word and not the final destination path.
- Evidence check: separate a printed value from identity, ordering, ownership, type or repository state.
- Repair check: use the reversible procedure “Compute one example destination string before exporting the full index.” and record the first changed observation.
- Transfer check: repeat the rule in a second context and identify what remains invariant.
A parent does not need to know the final Git checkout-index syntax. For this chapter, useful prompts are: “What did you expect from A missing trailing slash changes names?”, “Which state changed first?”, “What evidence tests that prediction?”, and “Can the case exposing reviewing only the prefix word and not the final destination path be made smaller?” The learner, not the parent, should supply the technical explanation.
Practice with an explained answer
Question. Build a tiny school website repository with staged HTML, an edited working copy and a disposable export folder. Include one ordinary case, one boundary and one deliberate failure caused by reviewing only the prefix word and not the final destination path. Predict each result before using a tool, then report the first point where observation differs from prediction.
Answer guide. A strong response starts with the rule: Because prefixing is literal, –prefix=.copy- can create .copy-path rather than a directory tree. It shows a trace, not only a final value. The ordinary case should demonstrate “The output name is .copy-notes.txt, demonstrating literal concatenation.” The boundary must exercise the same mechanism at an edge, and the deliberate failure must be repaired with: Compute one example destination string before exporting the full index. Other data choices are valid when the evidence supports the same causal chain.
Decision and transfer
For A missing trailing slash changes names, separate the documented Git checkout-index mechanism from the project policy. State exactly what the technical contract guarantees, then state the project choice about validation, ordering, ownership, performance or recovery. Test whether the same distinction survives one transfer case, and keep stateful experiments disposable and backed up.
Previous chapter . Contents . Next chapter
An export with –prefix and –all represents the current index, which can differ from the checked-out commit. Treat that sentence as a testable model. A secure learner can point to the relevant input, name the operation, describe the resulting state and identify one observation that would prove the model incomplete.
The high-value mistake in this chapter is calling the result a commit export without first aligning the index to that commit. It matters because the output may look reasonable while the ownership, ordering, identity or safety rule is wrong. Record git write-tree or read the desired tree into a temporary index before claiming provenance.
For the Export reflects the prepared index chapter on Git checkout-index, use a two-column trace during a short Punggol home session. On the left, write the predicted state for this exact mechanism before the tool runs. On the right, record the observation that bears on calling the result a commit export without first aligning the index to that commit. Explain the earliest difference with one causal sentence, then repeat only the smallest changed case.
Core worked example
tree=$(git write-tree)
printf '%s
' "$tree"
git checkout-index --prefix=../export/ --allExplained result. The printed tree object identifies the exact index snapshot used for the export. Check the boundary as well as the happy path: ask what happens with an empty input, a duplicate or tied value, an unsupported type, a missing path, a NULL, or a second reference to the same object. Only the relevant boundary should be kept; the list is a prompt for judgment, not a demand to force every case into every example.
Four purposeful transfer cases
Case 1: school website repository. Stress-test the rule using staged HTML, an edited working copy and a disposable export folder. State the input grain or object graph, the chapter boundary and the intended output before choosing syntax. Change only one variable, so a wrong prediction has a single plausible cause.
Reasoned route. Begin with “An export with –prefix and –all represents the current index, which can differ from the checked-out commit.” Apply this procedure: Record git write-tree or read the desired tree into a temporary index before claiming provenance. The expected mechanism is: The printed tree object identifies the exact index snapshot used for the export. For the school website repository, add one near-miss that exposes calling the result a commit export without first aligning the index to that commit. The answer is complete only when it says why the near-miss fails and how the corrected model transfers to a different project without relying on the original variable names.
Case 2: coding CCA project. Explain the rule using selected source files, generated output and a safe restoration test. State the input grain or object graph, the chapter boundary and the intended output before choosing syntax. Change only one variable, so a wrong prediction has a single plausible cause.
Reasoned route. Begin with “An export with –prefix and –all represents the current index, which can differ from the checked-out commit.” Apply this procedure: Record git write-tree or read the desired tree into a temporary index before claiming provenance. The expected mechanism is: The printed tree object identifies the exact index snapshot used for the export. For the coding CCA project, add one near-miss that exposes calling the result a commit export without first aligning the index to that commit. The answer is complete only when it says why the near-miss fails and how the corrected model transfers to a different project without relying on the original variable names.
Case 3: science data script. Transfer the rule using a staged parser, local experiment edits and a clean comparison copy. State the input grain or object graph, the chapter boundary and the intended output before choosing syntax. Change only one variable, so a wrong prediction has a single plausible cause.
Reasoned route. Begin with “An export with –prefix and –all represents the current index, which can differ from the checked-out commit.” Apply this procedure: Record git write-tree or read the desired tree into a temporary index before claiming provenance. The expected mechanism is: The printed tree object identifies the exact index snapshot used for the export. For the science data script, add one near-miss that exposes calling the result a commit export without first aligning the index to that commit. The answer is complete only when it says why the near-miss fails and how the corrected model transfers to a different project without relying on the original variable names.
Case 4: revision notes repository. Predict the rule using tracked Markdown, an index snapshot and an export prefix. State the input grain or object graph, the chapter boundary and the intended output before choosing syntax. Change only one variable, so a wrong prediction has a single plausible cause.
Reasoned route. Begin with “An export with –prefix and –all represents the current index, which can differ from the checked-out commit.” Apply this procedure: Record git write-tree or read the desired tree into a temporary index before claiming provenance. The expected mechanism is: The printed tree object identifies the exact index snapshot used for the export. For the revision notes repository, add one near-miss that exposes calling the result a commit export without first aligning the index to that commit. The answer is complete only when it says why the near-miss fails and how the corrected model transfers to a different project without relying on the original variable names.
Diagnostic route
- Model check: ask the learner to draw or list the exact rows, fields, references, paths or states involved.
- Boundary check: create the smallest input that triggers calling the result a commit export without first aligning the index to that commit.
- Evidence check: separate a printed value from identity, ordering, ownership, type or repository state.
- Repair check: use the reversible procedure “Record git write-tree or read the desired tree into a temporary index before claiming provenance.” and record the first changed observation.
- Transfer check: repeat the rule in a second context and identify what remains invariant.
A parent does not need to know the final Git checkout-index syntax. For this chapter, useful prompts are: “What did you expect from Export reflects the prepared index?”, “Which state changed first?”, “What evidence tests that prediction?”, and “Can the case exposing calling the result a commit export without first aligning the index to that commit be made smaller?” The learner, not the parent, should supply the technical explanation.
Practice with an explained answer
Question. Build a tiny coding CCA project with selected source files, generated output and a safe restoration test. Include one ordinary case, one boundary and one deliberate failure caused by calling the result a commit export without first aligning the index to that commit. Predict each result before using a tool, then report the first point where observation differs from prediction.
Answer guide. A strong response starts with the rule: An export with –prefix and –all represents the current index, which can differ from the checked-out commit. It shows a trace, not only a final value. The ordinary case should demonstrate “The printed tree object identifies the exact index snapshot used for the export.” The boundary must exercise the same mechanism at an edge, and the deliberate failure must be repaired with: Record git write-tree or read the desired tree into a temporary index before claiming provenance. Other data choices are valid when the evidence supports the same causal chain.
Decision and transfer
For Export reflects the prepared index, separate the documented Git checkout-index mechanism from the project policy. State exactly what the technical contract guarantees, then state the project choice about validation, ordering, ownership, performance or recovery. Test whether the same distinction survives one transfer case, and keep stateful experiments disposable and backed up.
Previous chapter . Contents . Next chapter
Broad checkout normally respects skip-worktree bits used by sparse working-tree workflows. Treat that sentence as a testable model. A secure learner can point to the relevant input, name the operation, describe the resulting state and identify one observation that would prove the model incomplete.
The high-value mistake in this chapter is expecting –all to materialise paths intentionally kept sparse. It matters because the output may look reasonable while the ownership, ordering, identity or safety rule is wrong. Inspect git ls-files -v and decide whether sparse policy should remain in force.
For the Skip-worktree entries are omitted by –all chapter on Git checkout-index, use a two-column trace during a short Punggol home session. On the left, write the predicted state for this exact mechanism before the tool runs. On the right, record the observation that bears on expecting –all to materialise paths intentionally kept sparse. Explain the earliest difference with one causal sentence, then repeat only the smallest changed case.
Core worked example
git ls-files -v | head
git checkout-index --allExplained result. Eligible normal entries are checked out while skip-worktree paths remain excluded. Check the boundary as well as the happy path: ask what happens with an empty input, a duplicate or tied value, an unsupported type, a missing path, a NULL, or a second reference to the same object. Only the relevant boundary should be kept; the list is a prompt for judgment, not a demand to force every case into every example.
Four purposeful transfer cases
Case 1: science data script. Explain the rule using a staged parser, local experiment edits and a clean comparison copy. State the input grain or object graph, the chapter boundary and the intended output before choosing syntax. Change only one variable, so a wrong prediction has a single plausible cause.
Reasoned route. Begin with “Broad checkout normally respects skip-worktree bits used by sparse working-tree workflows.” Apply this procedure: Inspect git ls-files -v and decide whether sparse policy should remain in force. The expected mechanism is: Eligible normal entries are checked out while skip-worktree paths remain excluded. For the science data script, add one near-miss that exposes expecting –all to materialise paths intentionally kept sparse. The answer is complete only when it says why the near-miss fails and how the corrected model transfers to a different project without relying on the original variable names.
Case 2: revision notes repository. Transfer the rule using tracked Markdown, an index snapshot and an export prefix. State the input grain or object graph, the chapter boundary and the intended output before choosing syntax. Change only one variable, so a wrong prediction has a single plausible cause.
Reasoned route. Begin with “Broad checkout normally respects skip-worktree bits used by sparse working-tree workflows.” Apply this procedure: Inspect git ls-files -v and decide whether sparse policy should remain in force. The expected mechanism is: Eligible normal entries are checked out while skip-worktree paths remain excluded. For the revision notes repository, add one near-miss that exposes expecting –all to materialise paths intentionally kept sparse. The answer is complete only when it says why the near-miss fails and how the corrected model transfers to a different project without relying on the original variable names.
Case 3: team merge lab. Predict the rule using base, ours and theirs stages for one conflicted file. State the input grain or object graph, the chapter boundary and the intended output before choosing syntax. Change only one variable, so a wrong prediction has a single plausible cause.
Reasoned route. Begin with “Broad checkout normally respects skip-worktree bits used by sparse working-tree workflows.” Apply this procedure: Inspect git ls-files -v and decide whether sparse policy should remain in force. The expected mechanism is: Eligible normal entries are checked out while skip-worktree paths remain excluded. For the team merge lab, add one near-miss that exposes expecting –all to materialise paths intentionally kept sparse. The answer is complete only when it says why the near-miss fails and how the corrected model transfers to a different project without relying on the original variable names.
Case 4: release bundle. Contrast the rule using a prepared index, a clean destination and a verification manifest. State the input grain or object graph, the chapter boundary and the intended output before choosing syntax. Change only one variable, so a wrong prediction has a single plausible cause.
Reasoned route. Begin with “Broad checkout normally respects skip-worktree bits used by sparse working-tree workflows.” Apply this procedure: Inspect git ls-files -v and decide whether sparse policy should remain in force. The expected mechanism is: Eligible normal entries are checked out while skip-worktree paths remain excluded. For the release bundle, add one near-miss that exposes expecting –all to materialise paths intentionally kept sparse. The answer is complete only when it says why the near-miss fails and how the corrected model transfers to a different project without relying on the original variable names.
Diagnostic route
- Model check: ask the learner to draw or list the exact rows, fields, references, paths or states involved.
- Boundary check: create the smallest input that triggers expecting –all to materialise paths intentionally kept sparse.
- Evidence check: separate a printed value from identity, ordering, ownership, type or repository state.
- Repair check: use the reversible procedure “Inspect git ls-files -v and decide whether sparse policy should remain in force.” and record the first changed observation.
- Transfer check: repeat the rule in a second context and identify what remains invariant.
A parent does not need to know the final Git checkout-index syntax. For this chapter, useful prompts are: “What did you expect from Skip-worktree entries are omitted by –all?”, “Which state changed first?”, “What evidence tests that prediction?”, and “Can the case exposing expecting –all to materialise paths intentionally kept sparse be made smaller?” The learner, not the parent, should supply the technical explanation.
Practice with an explained answer
Question. Build a tiny science data script with a staged parser, local experiment edits and a clean comparison copy. Include one ordinary case, one boundary and one deliberate failure caused by expecting –all to materialise paths intentionally kept sparse. Predict each result before using a tool, then report the first point where observation differs from prediction.
Answer guide. A strong response starts with the rule: Broad checkout normally respects skip-worktree bits used by sparse working-tree workflows. It shows a trace, not only a final value. The ordinary case should demonstrate “Eligible normal entries are checked out while skip-worktree paths remain excluded.” The boundary must exercise the same mechanism at an edge, and the deliberate failure must be repaired with: Inspect git ls-files -v and decide whether sparse policy should remain in force. Other data choices are valid when the evidence supports the same causal chain.
Decision and transfer
For Skip-worktree entries are omitted by –all, separate the documented Git checkout-index mechanism from the project policy. State exactly what the technical contract guarantees, then state the project choice about validation, ordering, ownership, performance or recovery. Test whether the same distinction survives one transfer case, and keep stateful experiments disposable and backed up.
Previous chapter . Contents . Next chapter
This option tells checkout-index to include entries even when the skip-worktree bit is set. Treat that sentence as a testable model. A secure learner can point to the relevant input, name the operation, describe the resulting state and identify one observation that would prove the model incomplete.
The high-value mistake in this chapter is using it casually and flooding a sparse working tree with paths. It matters because the output may look reasonable while the ownership, ordering, identity or safety rule is wrong. Run in a disposable worktree, estimate scope and verify disk and path consequences.
For the –ignore-skip-worktree-bits broadens scope chapter on Git checkout-index, use a two-column trace during a short Punggol home session. On the left, write the predicted state for this exact mechanism before the tool runs. On the right, record the observation that bears on using it casually and flooding a sparse working tree with paths. Explain the earliest difference with one causal sentence, then repeat only the smallest changed case.
Core worked example
git checkout-index --ignore-skip-worktree-bits --allExplained result. The operation considers all index entries, including those normally omitted by sparse state. Check the boundary as well as the happy path: ask what happens with an empty input, a duplicate or tied value, an unsupported type, a missing path, a NULL, or a second reference to the same object. Only the relevant boundary should be kept; the list is a prompt for judgment, not a demand to force every case into every example.
Four purposeful transfer cases
Case 1: team merge lab. Transfer the rule using base, ours and theirs stages for one conflicted file. State the input grain or object graph, the chapter boundary and the intended output before choosing syntax. Change only one variable, so a wrong prediction has a single plausible cause.
Reasoned route. Begin with “This option tells checkout-index to include entries even when the skip-worktree bit is set.” Apply this procedure: Run in a disposable worktree, estimate scope and verify disk and path consequences. The expected mechanism is: The operation considers all index entries, including those normally omitted by sparse state. For the team merge lab, add one near-miss that exposes using it casually and flooding a sparse working tree with paths. The answer is complete only when it says why the near-miss fails and how the corrected model transfers to a different project without relying on the original variable names.
Case 2: release bundle. Predict the rule using a prepared index, a clean destination and a verification manifest. State the input grain or object graph, the chapter boundary and the intended output before choosing syntax. Change only one variable, so a wrong prediction has a single plausible cause.
Reasoned route. Begin with “This option tells checkout-index to include entries even when the skip-worktree bit is set.” Apply this procedure: Run in a disposable worktree, estimate scope and verify disk and path consequences. The expected mechanism is: The operation considers all index entries, including those normally omitted by sparse state. For the release bundle, add one near-miss that exposes using it casually and flooding a sparse working tree with paths. The answer is complete only when it says why the near-miss fails and how the corrected model transfers to a different project without relying on the original variable names.
Case 3: filename safety test. Contrast the rule using spaces, leading dashes and NUL-delimited path input. State the input grain or object graph, the chapter boundary and the intended output before choosing syntax. Change only one variable, so a wrong prediction has a single plausible cause.
Reasoned route. Begin with “This option tells checkout-index to include entries even when the skip-worktree bit is set.” Apply this procedure: Run in a disposable worktree, estimate scope and verify disk and path consequences. The expected mechanism is: The operation considers all index entries, including those normally omitted by sparse state. For the filename safety test, add one near-miss that exposes using it casually and flooding a sparse working tree with paths. The answer is complete only when it says why the near-miss fails and how the corrected model transfers to a different project without relying on the original variable names.
Case 4: recovery rehearsal. Stress-test the rule using a temporary clone, known staged content and checksum evidence. State the input grain or object graph, the chapter boundary and the intended output before choosing syntax. Change only one variable, so a wrong prediction has a single plausible cause.
Reasoned route. Begin with “This option tells checkout-index to include entries even when the skip-worktree bit is set.” Apply this procedure: Run in a disposable worktree, estimate scope and verify disk and path consequences. The expected mechanism is: The operation considers all index entries, including those normally omitted by sparse state. For the recovery rehearsal, add one near-miss that exposes using it casually and flooding a sparse working tree with paths. The answer is complete only when it says why the near-miss fails and how the corrected model transfers to a different project without relying on the original variable names.
Diagnostic route
- Model check: ask the learner to draw or list the exact rows, fields, references, paths or states involved.
- Boundary check: create the smallest input that triggers using it casually and flooding a sparse working tree with paths.
- Evidence check: separate a printed value from identity, ordering, ownership, type or repository state.
- Repair check: use the reversible procedure “Run in a disposable worktree, estimate scope and verify disk and path consequences.” and record the first changed observation.
- Transfer check: repeat the rule in a second context and identify what remains invariant.
A parent does not need to know the final Git checkout-index syntax. For this chapter, useful prompts are: “What did you expect from –ignore-skip-worktree-bits broadens scope?”, “Which state changed first?”, “What evidence tests that prediction?”, and “Can the case exposing using it casually and flooding a sparse working tree with paths be made smaller?” The learner, not the parent, should supply the technical explanation.
Practice with an explained answer
Question. Build a tiny revision notes repository with tracked Markdown, an index snapshot and an export prefix. Include one ordinary case, one boundary and one deliberate failure caused by using it casually and flooding a sparse working tree with paths. Predict each result before using a tool, then report the first point where observation differs from prediction.
Answer guide. A strong response starts with the rule: This option tells checkout-index to include entries even when the skip-worktree bit is set. It shows a trace, not only a final value. The ordinary case should demonstrate “The operation considers all index entries, including those normally omitted by sparse state.” The boundary must exercise the same mechanism at an edge, and the deliberate failure must be repaired with: Run in a disposable worktree, estimate scope and verify disk and path consequences. Other data choices are valid when the evidence supports the same causal chain.
Decision and transfer
For –ignore-skip-worktree-bits broadens scope, separate the documented Git checkout-index mechanism from the project policy. State exactly what the technical contract guarantees, then state the project choice about validation, ordering, ownership, performance or recovery. Test whether the same distinction survives one transfer case, and keep stateful experiments disposable and backed up.
Previous chapter . Contents . Next chapter
With –stdin, checkout-index reads path names from standard input instead of command arguments. Treat that sentence as a testable model. A secure learner can point to the relevant input, name the operation, describe the resulting state and identify one observation that would prove the model incomplete.
The high-value mistake in this chapter is feeding newline-delimited names that themselves contain newlines or interpreting empty input as all. It matters because the output may look reasonable while the ownership, ordering, identity or safety rule is wrong. Generate a precise list and pair it with -z when arbitrary filenames are possible.
For the –stdin scales path selection chapter on Git checkout-index, use a two-column trace during a short Punggol home session. On the left, write the predicted state for this exact mechanism before the tool runs. On the right, record the observation that bears on feeding newline-delimited names that themselves contain newlines or interpreting empty input as all. Explain the earliest difference with one causal sentence, then repeat only the smallest changed case.
Core worked example
printf 'notes.txt
src/app.js
' | git checkout-index --stdinExplained result. Only the two listed index paths are requested; an empty stream would request none. Check the boundary as well as the happy path: ask what happens with an empty input, a duplicate or tied value, an unsupported type, a missing path, a NULL, or a second reference to the same object. Only the relevant boundary should be kept; the list is a prompt for judgment, not a demand to force every case into every example.
Four purposeful transfer cases
Case 1: filename safety test. Predict the rule using spaces, leading dashes and NUL-delimited path input. State the input grain or object graph, the chapter boundary and the intended output before choosing syntax. Change only one variable, so a wrong prediction has a single plausible cause.
Reasoned route. Begin with “With –stdin, checkout-index reads path names from standard input instead of command arguments.” Apply this procedure: Generate a precise list and pair it with -z when arbitrary filenames are possible. The expected mechanism is: Only the two listed index paths are requested; an empty stream would request none. For the filename safety test, add one near-miss that exposes feeding newline-delimited names that themselves contain newlines or interpreting empty input as all. The answer is complete only when it says why the near-miss fails and how the corrected model transfers to a different project without relying on the original variable names.
Case 2: recovery rehearsal. Contrast the rule using a temporary clone, known staged content and checksum evidence. State the input grain or object graph, the chapter boundary and the intended output before choosing syntax. Change only one variable, so a wrong prediction has a single plausible cause.
Reasoned route. Begin with “With –stdin, checkout-index reads path names from standard input instead of command arguments.” Apply this procedure: Generate a precise list and pair it with -z when arbitrary filenames are possible. The expected mechanism is: Only the two listed index paths are requested; an empty stream would request none. For the recovery rehearsal, add one near-miss that exposes feeding newline-delimited names that themselves contain newlines or interpreting empty input as all. The answer is complete only when it says why the near-miss fails and how the corrected model transfers to a different project without relying on the original variable names.
Case 3: school website repository. Stress-test the rule using staged HTML, an edited working copy and a disposable export folder. State the input grain or object graph, the chapter boundary and the intended output before choosing syntax. Change only one variable, so a wrong prediction has a single plausible cause.
Reasoned route. Begin with “With –stdin, checkout-index reads path names from standard input instead of command arguments.” Apply this procedure: Generate a precise list and pair it with -z when arbitrary filenames are possible. The expected mechanism is: Only the two listed index paths are requested; an empty stream would request none. For the school website repository, add one near-miss that exposes feeding newline-delimited names that themselves contain newlines or interpreting empty input as all. The answer is complete only when it says why the near-miss fails and how the corrected model transfers to a different project without relying on the original variable names.
Case 4: coding CCA project. Explain the rule using selected source files, generated output and a safe restoration test. State the input grain or object graph, the chapter boundary and the intended output before choosing syntax. Change only one variable, so a wrong prediction has a single plausible cause.
Reasoned route. Begin with “With –stdin, checkout-index reads path names from standard input instead of command arguments.” Apply this procedure: Generate a precise list and pair it with -z when arbitrary filenames are possible. The expected mechanism is: Only the two listed index paths are requested; an empty stream would request none. For the coding CCA project, add one near-miss that exposes feeding newline-delimited names that themselves contain newlines or interpreting empty input as all. The answer is complete only when it says why the near-miss fails and how the corrected model transfers to a different project without relying on the original variable names.
Diagnostic route
- Model check: ask the learner to draw or list the exact rows, fields, references, paths or states involved.
- Boundary check: create the smallest input that triggers feeding newline-delimited names that themselves contain newlines or interpreting empty input as all.
- Evidence check: separate a printed value from identity, ordering, ownership, type or repository state.
- Repair check: use the reversible procedure “Generate a precise list and pair it with -z when arbitrary filenames are possible.” and record the first changed observation.
- Transfer check: repeat the rule in a second context and identify what remains invariant.
A parent does not need to know the final Git checkout-index syntax. For this chapter, useful prompts are: “What did you expect from –stdin scales path selection?”, “Which state changed first?”, “What evidence tests that prediction?”, and “Can the case exposing feeding newline-delimited names that themselves contain newlines or interpreting empty input as all be made smaller?” The learner, not the parent, should supply the technical explanation.
Practice with an explained answer
Question. Build a tiny team merge lab with base, ours and theirs stages for one conflicted file. Include one ordinary case, one boundary and one deliberate failure caused by feeding newline-delimited names that themselves contain newlines or interpreting empty input as all. Predict each result before using a tool, then report the first point where observation differs from prediction.
Answer guide. A strong response starts with the rule: With –stdin, checkout-index reads path names from standard input instead of command arguments. It shows a trace, not only a final value. The ordinary case should demonstrate “Only the two listed index paths are requested; an empty stream would request none.” The boundary must exercise the same mechanism at an edge, and the deliberate failure must be repaired with: Generate a precise list and pair it with -z when arbitrary filenames are possible. Other data choices are valid when the evidence supports the same causal chain.
Decision and transfer
For –stdin scales path selection, separate the documented Git checkout-index mechanism from the project policy. State exactly what the technical contract guarantees, then state the project choice about validation, ordering, ownership, performance or recovery. Test whether the same distinction survives one transfer case, and keep stateful experiments disposable and backed up.
Previous chapter . Contents . Next chapter
The -z option changes –stdin separators to NUL bytes, preserving spaces and embedded newlines safely. Treat that sentence as a testable model. A secure learner can point to the relevant input, name the operation, describe the resulting state and identify one observation that would prove the model incomplete.
The high-value mistake in this chapter is parsing filenames with shell word splitting. It matters because the output may look reasonable while the ownership, ordering, identity or safety rule is wrong. Produce and consume NUL-delimited paths end to end without storing them in a shell variable.
For the -z makes path records unambiguous chapter on Git checkout-index, use a two-column trace during a short Punggol home session. On the left, write the predicted state for this exact mechanism before the tool runs. On the right, record the observation that bears on parsing filenames with shell word splitting. Explain the earliest difference with one causal sentence, then repeat only the smallest changed case.
Core worked example
git ls-files -z '*.md' | git checkout-index --force -z --stdinExplained result. Each matching Markdown path remains one record regardless of whitespace. Check the boundary as well as the happy path: ask what happens with an empty input, a duplicate or tied value, an unsupported type, a missing path, a NULL, or a second reference to the same object. Only the relevant boundary should be kept; the list is a prompt for judgment, not a demand to force every case into every example.
Four purposeful transfer cases
Case 1: school website repository. Contrast the rule using staged HTML, an edited working copy and a disposable export folder. State the input grain or object graph, the chapter boundary and the intended output before choosing syntax. Change only one variable, so a wrong prediction has a single plausible cause.
Reasoned route. Begin with “The -z option changes –stdin separators to NUL bytes, preserving spaces and embedded newlines safely.” Apply this procedure: Produce and consume NUL-delimited paths end to end without storing them in a shell variable. The expected mechanism is: Each matching Markdown path remains one record regardless of whitespace. For the school website repository, add one near-miss that exposes parsing filenames with shell word splitting. The answer is complete only when it says why the near-miss fails and how the corrected model transfers to a different project without relying on the original variable names.
Case 2: coding CCA project. Stress-test the rule using selected source files, generated output and a safe restoration test. State the input grain or object graph, the chapter boundary and the intended output before choosing syntax. Change only one variable, so a wrong prediction has a single plausible cause.
Reasoned route. Begin with “The -z option changes –stdin separators to NUL bytes, preserving spaces and embedded newlines safely.” Apply this procedure: Produce and consume NUL-delimited paths end to end without storing them in a shell variable. The expected mechanism is: Each matching Markdown path remains one record regardless of whitespace. For the coding CCA project, add one near-miss that exposes parsing filenames with shell word splitting. The answer is complete only when it says why the near-miss fails and how the corrected model transfers to a different project without relying on the original variable names.
Case 3: science data script. Explain the rule using a staged parser, local experiment edits and a clean comparison copy. State the input grain or object graph, the chapter boundary and the intended output before choosing syntax. Change only one variable, so a wrong prediction has a single plausible cause.
Reasoned route. Begin with “The -z option changes –stdin separators to NUL bytes, preserving spaces and embedded newlines safely.” Apply this procedure: Produce and consume NUL-delimited paths end to end without storing them in a shell variable. The expected mechanism is: Each matching Markdown path remains one record regardless of whitespace. For the science data script, add one near-miss that exposes parsing filenames with shell word splitting. The answer is complete only when it says why the near-miss fails and how the corrected model transfers to a different project without relying on the original variable names.
Case 4: revision notes repository. Transfer the rule using tracked Markdown, an index snapshot and an export prefix. State the input grain or object graph, the chapter boundary and the intended output before choosing syntax. Change only one variable, so a wrong prediction has a single plausible cause.
Reasoned route. Begin with “The -z option changes –stdin separators to NUL bytes, preserving spaces and embedded newlines safely.” Apply this procedure: Produce and consume NUL-delimited paths end to end without storing them in a shell variable. The expected mechanism is: Each matching Markdown path remains one record regardless of whitespace. For the revision notes repository, add one near-miss that exposes parsing filenames with shell word splitting. The answer is complete only when it says why the near-miss fails and how the corrected model transfers to a different project without relying on the original variable names.
Diagnostic route
- Model check: ask the learner to draw or list the exact rows, fields, references, paths or states involved.
- Boundary check: create the smallest input that triggers parsing filenames with shell word splitting.
- Evidence check: separate a printed value from identity, ordering, ownership, type or repository state.
- Repair check: use the reversible procedure “Produce and consume NUL-delimited paths end to end without storing them in a shell variable.” and record the first changed observation.
- Transfer check: repeat the rule in a second context and identify what remains invariant.
A parent does not need to know the final Git checkout-index syntax. For this chapter, useful prompts are: “What did you expect from -z makes path records unambiguous?”, “Which state changed first?”, “What evidence tests that prediction?”, and “Can the case exposing parsing filenames with shell word splitting be made smaller?” The learner, not the parent, should supply the technical explanation.
Practice with an explained answer
Question. Build a tiny release bundle with a prepared index, a clean destination and a verification manifest. Include one ordinary case, one boundary and one deliberate failure caused by parsing filenames with shell word splitting. Predict each result before using a tool, then report the first point where observation differs from prediction.
Answer guide. A strong response starts with the rule: The -z option changes –stdin separators to NUL bytes, preserving spaces and embedded newlines safely. It shows a trace, not only a final value. The ordinary case should demonstrate “Each matching Markdown path remains one record regardless of whitespace.” The boundary must exercise the same mechanism at an edge, and the deliberate failure must be repaired with: Produce and consume NUL-delimited paths end to end without storing them in a shell variable. Other data choices are valid when the evidence supports the same causal chain.
Decision and transfer
For -z makes path records unambiguous, separate the documented Git checkout-index mechanism from the project policy. State exactly what the technical contract guarantees, then state the project choice about validation, ordering, ownership, performance or recovery. Test whether the same distinction survives one transfer case, and keep stateful experiments disposable and backed up.
Previous chapter . Contents . Next chapter
CHAPTER 18 OF 20 . Transfer with judgment
18. Conflict stages can be copied separately
For an unmerged entry, –stage=1, 2 or 3 selects the base, ours or theirs version recorded in the index. Treat that sentence as a testable model. A secure learner can point to the relevant input, name the operation, describe the resulting state and identify one observation that would prove the model incomplete.
The high-value mistake in this chapter is guessing stage meanings or overwriting the conflicted working file before examination. It matters because the output may look reasonable while the ownership, ordering, identity or safety rule is wrong. Use git ls-files -u, export stages to temporary files and label each comparison.
For the Conflict stages can be copied separately chapter on Git checkout-index, use a two-column trace during a short Punggol home session. On the left, write the predicted state for this exact mechanism before the tool runs. On the right, record the observation that bears on guessing stage meanings or overwriting the conflicted working file before examination. Explain the earliest difference with one causal sentence, then repeat only the smallest changed case.
Core worked example
git ls-files -u -- conflict.txt
git checkout-index --stage=2 --temp -- conflict.txtExplained result. The command writes the ours-stage content to a temporary file and reports its association. Check the boundary as well as the happy path: ask what happens with an empty input, a duplicate or tied value, an unsupported type, a missing path, a NULL, or a second reference to the same object. Only the relevant boundary should be kept; the list is a prompt for judgment, not a demand to force every case into every example.
Four purposeful transfer cases
Case 1: science data script. Stress-test the rule using a staged parser, local experiment edits and a clean comparison copy. State the input grain or object graph, the chapter boundary and the intended output before choosing syntax. Change only one variable, so a wrong prediction has a single plausible cause.
Reasoned route. Begin with “For an unmerged entry, –stage=1, 2 or 3 selects the base, ours or theirs version recorded in the index.” Apply this procedure: Use git ls-files -u, export stages to temporary files and label each comparison. The expected mechanism is: The command writes the ours-stage content to a temporary file and reports its association. For the science data script, add one near-miss that exposes guessing stage meanings or overwriting the conflicted working file before examination. The answer is complete only when it says why the near-miss fails and how the corrected model transfers to a different project without relying on the original variable names.
Case 2: revision notes repository. Explain the rule using tracked Markdown, an index snapshot and an export prefix. State the input grain or object graph, the chapter boundary and the intended output before choosing syntax. Change only one variable, so a wrong prediction has a single plausible cause.
Reasoned route. Begin with “For an unmerged entry, –stage=1, 2 or 3 selects the base, ours or theirs version recorded in the index.” Apply this procedure: Use git ls-files -u, export stages to temporary files and label each comparison. The expected mechanism is: The command writes the ours-stage content to a temporary file and reports its association. For the revision notes repository, add one near-miss that exposes guessing stage meanings or overwriting the conflicted working file before examination. The answer is complete only when it says why the near-miss fails and how the corrected model transfers to a different project without relying on the original variable names.
Case 3: team merge lab. Transfer the rule using base, ours and theirs stages for one conflicted file. State the input grain or object graph, the chapter boundary and the intended output before choosing syntax. Change only one variable, so a wrong prediction has a single plausible cause.
Reasoned route. Begin with “For an unmerged entry, –stage=1, 2 or 3 selects the base, ours or theirs version recorded in the index.” Apply this procedure: Use git ls-files -u, export stages to temporary files and label each comparison. The expected mechanism is: The command writes the ours-stage content to a temporary file and reports its association. For the team merge lab, add one near-miss that exposes guessing stage meanings or overwriting the conflicted working file before examination. The answer is complete only when it says why the near-miss fails and how the corrected model transfers to a different project without relying on the original variable names.
Case 4: release bundle. Predict the rule using a prepared index, a clean destination and a verification manifest. State the input grain or object graph, the chapter boundary and the intended output before choosing syntax. Change only one variable, so a wrong prediction has a single plausible cause.
Reasoned route. Begin with “For an unmerged entry, –stage=1, 2 or 3 selects the base, ours or theirs version recorded in the index.” Apply this procedure: Use git ls-files -u, export stages to temporary files and label each comparison. The expected mechanism is: The command writes the ours-stage content to a temporary file and reports its association. For the release bundle, add one near-miss that exposes guessing stage meanings or overwriting the conflicted working file before examination. The answer is complete only when it says why the near-miss fails and how the corrected model transfers to a different project without relying on the original variable names.
Diagnostic route
- Model check: ask the learner to draw or list the exact rows, fields, references, paths or states involved.
- Boundary check: create the smallest input that triggers guessing stage meanings or overwriting the conflicted working file before examination.
- Evidence check: separate a printed value from identity, ordering, ownership, type or repository state.
- Repair check: use the reversible procedure “Use git ls-files -u, export stages to temporary files and label each comparison.” and record the first changed observation.
- Transfer check: repeat the rule in a second context and identify what remains invariant.
A parent does not need to know the final Git checkout-index syntax. For this chapter, useful prompts are: “What did you expect from Conflict stages can be copied separately?”, “Which state changed first?”, “What evidence tests that prediction?”, and “Can the case exposing guessing stage meanings or overwriting the conflicted working file before examination be made smaller?” The learner, not the parent, should supply the technical explanation.
Practice with an explained answer
Question. Build a tiny filename safety test with spaces, leading dashes and NUL-delimited path input. Include one ordinary case, one boundary and one deliberate failure caused by guessing stage meanings or overwriting the conflicted working file before examination. Predict each result before using a tool, then report the first point where observation differs from prediction.
Answer guide. A strong response starts with the rule: For an unmerged entry, –stage=1, 2 or 3 selects the base, ours or theirs version recorded in the index. It shows a trace, not only a final value. The ordinary case should demonstrate “The command writes the ours-stage content to a temporary file and reports its association.” The boundary must exercise the same mechanism at an edge, and the deliberate failure must be repaired with: Use git ls-files -u, export stages to temporary files and label each comparison. Other data choices are valid when the evidence supports the same causal chain.
Decision and transfer
For Conflict stages can be copied separately, separate the documented Git checkout-index mechanism from the project policy. State exactly what the technical contract guarantees, then state the project choice about validation, ordering, ownership, performance or recovery. Test whether the same distinction survives one transfer case, and keep stateful experiments disposable and backed up.
Previous chapter . Contents . Next chapter
Requesting all conflict stages produces temporary files and a stage-to-path mapping rather than choosing one working-tree version. Treat that sentence as a testable model. A secure learner can point to the relevant input, name the operation, describe the resulting state and identify one observation that would prove the model incomplete.
The high-value mistake in this chapter is expecting three files to overwrite one destination or ignoring a dot for a missing stage. It matters because the output may look reasonable while the ownership, ordering, identity or safety rule is wrong. Parse the documented output fields and keep the original conflict untouched during comparison.
For the –stage=all implies temporary output chapter on Git checkout-index, use a two-column trace during a short Punggol home session. On the left, write the predicted state for this exact mechanism before the tool runs. On the right, record the observation that bears on expecting three files to overwrite one destination or ignoring a dot for a missing stage. Explain the earliest difference with one causal sentence, then repeat only the smallest changed case.
Core worked example
git checkout-index --stage=all --temp -- conflict.txtExplained result. Output names identify available stage 1, 2 and 3 files; missing stages appear as dots. Check the boundary as well as the happy path: ask what happens with an empty input, a duplicate or tied value, an unsupported type, a missing path, a NULL, or a second reference to the same object. Only the relevant boundary should be kept; the list is a prompt for judgment, not a demand to force every case into every example.
Four purposeful transfer cases
Case 1: team merge lab. Explain the rule using base, ours and theirs stages for one conflicted file. State the input grain or object graph, the chapter boundary and the intended output before choosing syntax. Change only one variable, so a wrong prediction has a single plausible cause.
Reasoned route. Begin with “Requesting all conflict stages produces temporary files and a stage-to-path mapping rather than choosing one working-tree version.” Apply this procedure: Parse the documented output fields and keep the original conflict untouched during comparison. The expected mechanism is: Output names identify available stage 1, 2 and 3 files; missing stages appear as dots. For the team merge lab, add one near-miss that exposes expecting three files to overwrite one destination or ignoring a dot for a missing stage. The answer is complete only when it says why the near-miss fails and how the corrected model transfers to a different project without relying on the original variable names.
Case 2: release bundle. Transfer the rule using a prepared index, a clean destination and a verification manifest. State the input grain or object graph, the chapter boundary and the intended output before choosing syntax. Change only one variable, so a wrong prediction has a single plausible cause.
Reasoned route. Begin with “Requesting all conflict stages produces temporary files and a stage-to-path mapping rather than choosing one working-tree version.” Apply this procedure: Parse the documented output fields and keep the original conflict untouched during comparison. The expected mechanism is: Output names identify available stage 1, 2 and 3 files; missing stages appear as dots. For the release bundle, add one near-miss that exposes expecting three files to overwrite one destination or ignoring a dot for a missing stage. The answer is complete only when it says why the near-miss fails and how the corrected model transfers to a different project without relying on the original variable names.
Case 3: filename safety test. Predict the rule using spaces, leading dashes and NUL-delimited path input. State the input grain or object graph, the chapter boundary and the intended output before choosing syntax. Change only one variable, so a wrong prediction has a single plausible cause.
Reasoned route. Begin with “Requesting all conflict stages produces temporary files and a stage-to-path mapping rather than choosing one working-tree version.” Apply this procedure: Parse the documented output fields and keep the original conflict untouched during comparison. The expected mechanism is: Output names identify available stage 1, 2 and 3 files; missing stages appear as dots. For the filename safety test, add one near-miss that exposes expecting three files to overwrite one destination or ignoring a dot for a missing stage. The answer is complete only when it says why the near-miss fails and how the corrected model transfers to a different project without relying on the original variable names.
Case 4: recovery rehearsal. Contrast the rule using a temporary clone, known staged content and checksum evidence. State the input grain or object graph, the chapter boundary and the intended output before choosing syntax. Change only one variable, so a wrong prediction has a single plausible cause.
Reasoned route. Begin with “Requesting all conflict stages produces temporary files and a stage-to-path mapping rather than choosing one working-tree version.” Apply this procedure: Parse the documented output fields and keep the original conflict untouched during comparison. The expected mechanism is: Output names identify available stage 1, 2 and 3 files; missing stages appear as dots. For the recovery rehearsal, add one near-miss that exposes expecting three files to overwrite one destination or ignoring a dot for a missing stage. The answer is complete only when it says why the near-miss fails and how the corrected model transfers to a different project without relying on the original variable names.
Diagnostic route
- Model check: ask the learner to draw or list the exact rows, fields, references, paths or states involved.
- Boundary check: create the smallest input that triggers expecting three files to overwrite one destination or ignoring a dot for a missing stage.
- Evidence check: separate a printed value from identity, ordering, ownership, type or repository state.
- Repair check: use the reversible procedure “Parse the documented output fields and keep the original conflict untouched during comparison.” and record the first changed observation.
- Transfer check: repeat the rule in a second context and identify what remains invariant.
A parent does not need to know the final Git checkout-index syntax. For this chapter, useful prompts are: “What did you expect from –stage=all implies temporary output?”, “Which state changed first?”, “What evidence tests that prediction?”, and “Can the case exposing expecting three files to overwrite one destination or ignoring a dot for a missing stage be made smaller?” The learner, not the parent, should supply the technical explanation.
Practice with an explained answer
Question. Build a tiny recovery rehearsal with a temporary clone, known staged content and checksum evidence. Include one ordinary case, one boundary and one deliberate failure caused by expecting three files to overwrite one destination or ignoring a dot for a missing stage. Predict each result before using a tool, then report the first point where observation differs from prediction.
Answer guide. A strong response starts with the rule: Requesting all conflict stages produces temporary files and a stage-to-path mapping rather than choosing one working-tree version. It shows a trace, not only a final value. The ordinary case should demonstrate “Output names identify available stage 1, 2 and 3 files; missing stages appear as dots.” The boundary must exercise the same mechanism at an edge, and the deliberate failure must be repaired with: Parse the documented output fields and keep the original conflict untouched during comparison. Other data choices are valid when the evidence supports the same causal chain.
Decision and transfer
For –stage=all implies temporary output, separate the documented Git checkout-index mechanism from the project policy. State exactly what the technical contract guarantees, then state the project choice about validation, ordering, ownership, performance or recovery. Test whether the same distinction survives one transfer case, and keep stateful experiments disposable and backed up.
Previous chapter . Contents . Next chapter
CHAPTER 20 OF 20 . Transfer with judgment
20. Safe automation verifies bytes and scope
A reliable script records the index tree, selected paths, destination policy, exit status and checksums. Treat that sentence as a testable model. A secure learner can point to the relevant input, name the operation, describe the resulting state and identify one observation that would prove the model incomplete.
The high-value mistake in this chapter is treating a successful command as proof that the intended snapshot was exported completely. It matters because the output may look reasonable while the ownership, ordering, identity or safety rule is wrong. Use a fresh destination, fail on collisions and compare a manifest against the recorded tree.
For the Safe automation verifies bytes and scope chapter on Git checkout-index, use a two-column trace during a short Punggol home session. On the left, write the predicted state for this exact mechanism before the tool runs. On the right, record the observation that bears on treating a successful command as proof that the intended snapshot was exported completely. Explain the earliest difference with one causal sentence, then repeat only the smallest changed case.
Core worked example
git write-tree
git ls-files -z | git checkout-index --prefix=../verify/ -z --stdin
find ../verify -type f -printExplained result. The evidence links the selected index snapshot to concrete output paths that can be checked independently. Check the boundary as well as the happy path: ask what happens with an empty input, a duplicate or tied value, an unsupported type, a missing path, a NULL, or a second reference to the same object. Only the relevant boundary should be kept; the list is a prompt for judgment, not a demand to force every case into every example.
Four purposeful transfer cases
Case 1: filename safety test. Transfer the rule using spaces, leading dashes and NUL-delimited path input. State the input grain or object graph, the chapter boundary and the intended output before choosing syntax. Change only one variable, so a wrong prediction has a single plausible cause.
Reasoned route. Begin with “A reliable script records the index tree, selected paths, destination policy, exit status and checksums.” Apply this procedure: Use a fresh destination, fail on collisions and compare a manifest against the recorded tree. The expected mechanism is: The evidence links the selected index snapshot to concrete output paths that can be checked independently. For the filename safety test, add one near-miss that exposes treating a successful command as proof that the intended snapshot was exported completely. The answer is complete only when it says why the near-miss fails and how the corrected model transfers to a different project without relying on the original variable names.
Case 2: recovery rehearsal. Predict the rule using a temporary clone, known staged content and checksum evidence. State the input grain or object graph, the chapter boundary and the intended output before choosing syntax. Change only one variable, so a wrong prediction has a single plausible cause.
Reasoned route. Begin with “A reliable script records the index tree, selected paths, destination policy, exit status and checksums.” Apply this procedure: Use a fresh destination, fail on collisions and compare a manifest against the recorded tree. The expected mechanism is: The evidence links the selected index snapshot to concrete output paths that can be checked independently. For the recovery rehearsal, add one near-miss that exposes treating a successful command as proof that the intended snapshot was exported completely. The answer is complete only when it says why the near-miss fails and how the corrected model transfers to a different project without relying on the original variable names.
Case 3: school website repository. Contrast the rule using staged HTML, an edited working copy and a disposable export folder. State the input grain or object graph, the chapter boundary and the intended output before choosing syntax. Change only one variable, so a wrong prediction has a single plausible cause.
Reasoned route. Begin with “A reliable script records the index tree, selected paths, destination policy, exit status and checksums.” Apply this procedure: Use a fresh destination, fail on collisions and compare a manifest against the recorded tree. The expected mechanism is: The evidence links the selected index snapshot to concrete output paths that can be checked independently. For the school website repository, add one near-miss that exposes treating a successful command as proof that the intended snapshot was exported completely. The answer is complete only when it says why the near-miss fails and how the corrected model transfers to a different project without relying on the original variable names.
Case 4: coding CCA project. Stress-test the rule using selected source files, generated output and a safe restoration test. State the input grain or object graph, the chapter boundary and the intended output before choosing syntax. Change only one variable, so a wrong prediction has a single plausible cause.
Reasoned route. Begin with “A reliable script records the index tree, selected paths, destination policy, exit status and checksums.” Apply this procedure: Use a fresh destination, fail on collisions and compare a manifest against the recorded tree. The expected mechanism is: The evidence links the selected index snapshot to concrete output paths that can be checked independently. For the coding CCA project, add one near-miss that exposes treating a successful command as proof that the intended snapshot was exported completely. The answer is complete only when it says why the near-miss fails and how the corrected model transfers to a different project without relying on the original variable names.
Diagnostic route
- Model check: ask the learner to draw or list the exact rows, fields, references, paths or states involved.
- Boundary check: create the smallest input that triggers treating a successful command as proof that the intended snapshot was exported completely.
- Evidence check: separate a printed value from identity, ordering, ownership, type or repository state.
- Repair check: use the reversible procedure “Use a fresh destination, fail on collisions and compare a manifest against the recorded tree.” and record the first changed observation.
- Transfer check: repeat the rule in a second context and identify what remains invariant.
A parent does not need to know the final Git checkout-index syntax. For this chapter, useful prompts are: “What did you expect from Safe automation verifies bytes and scope?”, “Which state changed first?”, “What evidence tests that prediction?”, and “Can the case exposing treating a successful command as proof that the intended snapshot was exported completely be made smaller?” The learner, not the parent, should supply the technical explanation.
Practice with an explained answer
Question. Build a tiny school website repository with staged HTML, an edited working copy and a disposable export folder. Include one ordinary case, one boundary and one deliberate failure caused by treating a successful command as proof that the intended snapshot was exported completely. Predict each result before using a tool, then report the first point where observation differs from prediction.
Answer guide. A strong response starts with the rule: A reliable script records the index tree, selected paths, destination policy, exit status and checksums. It shows a trace, not only a final value. The ordinary case should demonstrate “The evidence links the selected index snapshot to concrete output paths that can be checked independently.” The boundary must exercise the same mechanism at an edge, and the deliberate failure must be repaired with: Use a fresh destination, fail on collisions and compare a manifest against the recorded tree. Other data choices are valid when the evidence supports the same causal chain.
Decision and transfer
For Safe automation verifies bytes and scope, separate the documented Git checkout-index mechanism from the project policy. State exactly what the technical contract guarantees, then state the project choice about validation, ordering, ownership, performance or recovery. Test whether the same distinction survives one transfer case, and keep stateful experiments disposable and backed up.
Previous chapter . Contents . Next chapter
Parent guide: choose the next useful step
Start with evidence, not a label such as careless. Ask for one prediction and one trace. If the first transition is wrong, rebuild the model. If the model is sound but syntax fails, practise reference use. If routine cases are correct but boundaries fail, vary ties, defaults, unsupported inputs, ownership or missing paths. If explanations transfer, move to a small project.
Keep a weekly record with four lines: concept, prediction, observed difference and next test. Stop when fatigue replaces reasoning. A smaller case tomorrow is more useful than another hour of copying tonight.
Seek specialist help when cause and effect remain invisible after examples are reduced, when accessibility or data-loss implications are unclear, or when an important repository, database or application state may be at risk. Good support should make the learner’s reasoning more independent.
Capstone practice with explained routes
1. school website repository: model, boundary and recovery
Create a small school website repository using staged HTML, an edited working copy and a disposable export folder. Combine “The index is the source” with one later chapter. Include an ordinary case, a boundary, a deliberate failure and a recovery. Write the expected state before each operation.
Explained route. Start with: checkout-index materialises the blob and mode recorded in the index, not necessarily HEAD and not necessarily the current working-tree file. Apply: Compare HEAD, index and working tree with three commands before checkout. Verify: The copied content comes from the staged index entry for notes.txt. Then add a second chapter whose boundary could change the outcome. A complete solution contains the input model, a trace, observed evidence, a correction and one transfer statement. The exact data may differ; the causal chain must be checkable.
2. coding CCA project: model, boundary and recovery
Create a small coding CCA project using selected source files, generated output and a safe restoration test. Combine “Existing files are protected by default” with one later chapter. Include an ordinary case, a boundary, a deliberate failure and a recovery. Write the expected state before each operation.
Explained route. Start with: checkout-index does not overwrite an existing destination file unless force is requested. Apply: Create a disposable modified file, run without force and inspect both message and checksum. Verify: The existing notes.txt is not overwritten by the default invocation. Then add a second chapter whose boundary could change the outcome. A complete solution contains the input model, a trace, observed evidence, a correction and one transfer statement. The exact data may differ; the causal chain must be checkable.
3. science data script: model, boundary and recovery
Create a small science data script using a staged parser, local experiment edits and a clean comparison copy. Combine “Explicit paths need an option boundary” with one later chapter. Include an ordinary case, a boundary, a deliberate failure and a recovery. Write the expected state before each operation.
Explained route. Start with: The double dash ends option parsing so a tracked name beginning with a dash cannot become a checkout-index flag. Apply: Use — before path arguments and NUL-delimited input for generated path lists. Verify: The token -a is treated as a path rather than the –all option. Then add a second chapter whose boundary could change the outcome. A complete solution contains the input model, a trace, observed evidence, a correction and one transfer statement. The exact data may differ; the causal chain must be checkable.
4. revision notes repository: model, boundary and recovery
Create a small revision notes repository using tracked Markdown, an index snapshot and an export prefix. Combine “–quiet changes messages, not safety” with one later chapter. Include an ordinary case, a boundary, a deliberate failure and a recovery. Write the expected state before each operation.
Explained route. Start with: The -q or –quiet option suppresses complaints when files exist or are absent from the index. Apply: Verify destination hashes and exit status rather than relying on terminal output. Verify: Reduced output does not convert a missing index entry into a copied file. Then add a second chapter whose boundary could change the outcome. A complete solution contains the input model, a trace, observed evidence, a correction and one transfer statement. The exact data may differ; the causal chain must be checkable.
5. team merge lab: model, boundary and recovery
Create a small team merge lab using base, ours and theirs stages for one conflicted file. Combine “Export reflects the prepared index” with one later chapter. Include an ordinary case, a boundary, a deliberate failure and a recovery. Write the expected state before each operation.
Explained route. Start with: An export with –prefix and –all represents the current index, which can differ from the checked-out commit. Apply: Record git write-tree or read the desired tree into a temporary index before claiming provenance. Verify: The printed tree object identifies the exact index snapshot used for the export. Then add a second chapter whose boundary could change the outcome. A complete solution contains the input model, a trace, observed evidence, a correction and one transfer statement. The exact data may differ; the causal chain must be checkable.
6. release bundle: model, boundary and recovery
Create a small release bundle using a prepared index, a clean destination and a verification manifest. Combine “–stdin scales path selection” with one later chapter. Include an ordinary case, a boundary, a deliberate failure and a recovery. Write the expected state before each operation.
Explained route. Start with: With –stdin, checkout-index reads path names from standard input instead of command arguments. Apply: Generate a precise list and pair it with -z when arbitrary filenames are possible. Verify: Only the two listed index paths are requested; an empty stream would request none. Then add a second chapter whose boundary could change the outcome. A complete solution contains the input model, a trace, observed evidence, a correction and one transfer statement. The exact data may differ; the causal chain must be checkable.
7. filename safety test: model, boundary and recovery
Create a small filename safety test using spaces, leading dashes and NUL-delimited path input. Combine “–stage=all implies temporary output” with one later chapter. Include an ordinary case, a boundary, a deliberate failure and a recovery. Write the expected state before each operation.
Explained route. Start with: Requesting all conflict stages produces temporary files and a stage-to-path mapping rather than choosing one working-tree version. Apply: Parse the documented output fields and keep the original conflict untouched during comparison. Verify: Output names identify available stage 1, 2 and 3 files; missing stages appear as dots. Then add a second chapter whose boundary could change the outcome. A complete solution contains the input model, a trace, observed evidence, a correction and one transfer statement. The exact data may differ; the causal chain must be checkable.
8. recovery rehearsal: model, boundary and recovery
Create a small recovery rehearsal using a temporary clone, known staged content and checksum evidence. Combine “The destination is normally the working tree” with one later chapter. Include an ordinary case, a boundary, a deliberate failure and a recovery. Write the expected state before each operation.
Explained route. Start with: Without –temp or a prefix, selected entries are written at their indexed paths under the working tree. Apply: Confirm git rev-parse –show-toplevel and the exact pathspec before execution. Verify: The indexed src/app.js is copied to that working-tree path when safety rules permit. Then add a second chapter whose boundary could change the outcome. A complete solution contains the input model, a trace, observed evidence, a correction and one transfer statement. The exact data may differ; the causal chain must be checkable.
Frequently asked questions
How long should a practice session be?
Use one complete prediction–observation–explanation cycle while attention remains good. Ten to twenty focused minutes can be enough.
Should every option or function be memorised?
No. Memorise the governing distinctions and practise retrieving the official reference. Understanding means predicting and explaining, not reciting a parameter list.
What if the result is correct but the explanation is weak?
Treat it as partial success. Ask for a trace and change one boundary. A reliable model survives controlled variation.
Is the shortest solution the best?
Not automatically. Prefer the solution whose semantics, failure modes and maintenance cost are easiest to justify for the actual project.
When should official documentation be used?
Use it whenever syntax, supported types, SQL dialect behaviour or Git version details matter. Primary documentation settles the current contract.
How can a parent help without technical expertise?
Ask what was predicted, where the first difference appeared, what evidence matters and which smaller example could isolate it.
How do we test transfer?
Change the context, vocabulary and one boundary. Require the learner to identify the invariant before using a tool.
What should be saved after practice?
Keep the corrected rule, one trace, one boundary case and the next question. Avoid storing pages of unexplained output.
Can these exercises replace backups?
No. Use disposable examples and proper backups. Learning should not endanger schoolwork, repositories or personal data.
What counts as mastery?
The learner can predict, verify, diagnose, recover and justify a choice across more than one context, while knowing when to consult the current reference.

