Small Group Tutorials

Here to help students catch up, keep up, and move ahead. Book a consultation here.

How to Master Git Worktree in Punggol Tuition

A smiling student in a blue pinafore holds a pencil over an open book at a classroom desk, with textbooks, a whiteboard and a sunlit window nearby.

When a learner can produce a familiar result but cannot explain why a small change breaks it, the difficulty is usually not effort. The missing piece is a dependable model that connects each visible action to the state underneath.

Git worktree lets one repository support more than one checked-out working tree. The power comes from separating shared repository data from per-worktree files and state, so a learner can handle a hotfix or review without stashing the current task or cloning the whole repository again. This guide teaches that model immediately, then turns it into traces, worked cases, diagnostics and independent practice.

The goal is not a catalogue of tricks. By the end, a learner should be able to predict behaviour, identify the earliest incorrect assumption, select a safe procedure, and transfer the idea to a project that does not resemble the first example.

Families in Punggol can use the chapters in short sessions around schoolwork, CCAs and rest. Ten focused minutes of prediction and explanation often reveal more than an hour of copying. The examples are proposed home-learning activities, not claims about a physical branch, class schedule, result or service.

Use disposable examples, back up important work and check current behaviour against the official documentation. Technology changes; the habit of stating a model, testing a boundary and explaining evidence remains useful.

Find your next learning step

Choose the route that matches the present difficulty. The full index remains available for a systematic course.

Build the model

Chapters 1-4 . Begin with the first chapter in this route and move on after the learner can predict, test and explain.

Use the core tools

Chapters 5-8 . Begin with the first chapter in this route and move on after the learner can predict, test and explain.

Handle boundaries

Chapters 9-12 . Begin with the first chapter in this route and move on after the learner can predict, test and explain.

Debug and verify

Chapters 13-16 . Begin with the first chapter in this route and move on after the learner can predict, test and explain.

Transfer with judgment

Chapters 17-20 . Begin with the first chapter in this route and move on after the learner can predict, test and explain.

Open the full chapter index . Jump to the capstone practice . Use the How Studying Works hub . Read the official documentation

CHAPTER 1 OF 20 . Build the model

1. The repository and worktree model

Back to contents

A main worktree and linked worktrees share most repository data while each has its own checked-out files, index and HEAD. This is the chapter’s governing idea. A learner should be able to restate it in ordinary language, point to the relevant state in an example, and predict the consequence of one controlled change. Those three actions distinguish a working mental model from a phrase copied from a reference page.

The common trap is calling each linked worktree a separate repository. That error is informative: it shows which boundary the learner has not yet represented. Correct the earliest wrong assumption, not merely the final line. Label shared objects and refs separately from per-worktree HEAD, index and files.

For a short Punggol home session, use a prediction–observation–explanation cycle. Write the prediction before using the interpreter, browser or terminal. Record the observation exactly. Then write one causal sentence containing “because”. If the sentence only repeats the output, shrink the case until every transition can be named.

Core worked example

git worktree list

Reasoning. The listing shows paths, commits and branch associations. The important check is not whether the final output looks plausible. Identify the input state, the rule applied, the boundary at which the rule takes effect, and the evidence that would expose a different rule. Then change one part of the example and predict again.

Five deliberate variations

Variation 1: homework tracker. First, predict without running anything. Model a short list of assignments with subject, due date and completion state. Apply the chapter rule—a main worktree and linked worktrees share most repository data while each has its own checked-out files, index and HEAD. Before using a tool, state what remains unchanged, what is being varied, and which visible result would disprove the prediction.

Explained answer. Begin from the rule, not from a guessed output. The listing shows paths, commits and branch associations. In the homework tracker setting, inspect the earliest point where calling each linked worktree a separate repository could occur. The safe procedure is: Label shared objects and refs separately from per-worktree HEAD, index and files. If the data contains an empty value, a duplicate identity, a nested control, an unexpected ancestor or an unavailable path, pause and decide whether the chapter’s default policy still applies. This makes the exercise a transfer test rather than a cosmetic renaming of variables.

Variation 2: library search. Next, isolate one variable and hold the others constant. Model book records with title, topic, shelf code and availability. Apply the chapter rule—a main worktree and linked worktrees share most repository data while each has its own checked-out files, index and HEAD. Before using a tool, state what remains unchanged, what is being varied, and which visible result would disprove the prediction.

Explained answer. Begin from the rule, not from a guessed output. The listing shows paths, commits and branch associations. In the library search setting, inspect the earliest point where calling each linked worktree a separate repository could occur. The safe procedure is: Label shared objects and refs separately from per-worktree HEAD, index and files. If the data contains an empty value, a duplicate identity, a nested control, an unexpected ancestor or an unavailable path, pause and decide whether the chapter’s default policy still applies. This makes the exercise a transfer test rather than a cosmetic renaming of variables.

Variation 3: CCA sign-up. Now, test a boundary that a comfortable example would hide. Model activity rows with a name, weekday, capacity and registered pupils. Apply the chapter rule—a main worktree and linked worktrees share most repository data while each has its own checked-out files, index and HEAD. Before using a tool, state what remains unchanged, what is being varied, and which visible result would disprove the prediction.

Explained answer. Begin from the rule, not from a guessed output. The listing shows paths, commits and branch associations. In the CCA sign-up setting, inspect the earliest point where calling each linked worktree a separate repository could occur. The safe procedure is: Label shared objects and refs separately from per-worktree HEAD, index and files. If the data contains an empty value, a duplicate identity, a nested control, an unexpected ancestor or an unavailable path, pause and decide whether the chapter’s default policy still applies. This makes the exercise a transfer test rather than a cosmetic renaming of variables.

Variation 4: revision planner. Then, explain the result to a study partner without using jargon as a substitute for cause. Model topics tagged by confidence, next review date and evidence. Apply the chapter rule—a main worktree and linked worktrees share most repository data while each has its own checked-out files, index and HEAD. Before using a tool, state what remains unchanged, what is being varied, and which visible result would disprove the prediction.

Explained answer. Begin from the rule, not from a guessed output. The listing shows paths, commits and branch associations. In the revision planner setting, inspect the earliest point where calling each linked worktree a separate repository could occur. The safe procedure is: Label shared objects and refs separately from per-worktree HEAD, index and files. If the data contains an empty value, a duplicate identity, a nested control, an unexpected ancestor or an unavailable path, pause and decide whether the chapter’s default policy still applies. This makes the exercise a transfer test rather than a cosmetic renaming of variables.

Variation 5: canteen budget. Finally, transfer the rule to a new setting and state what would invalidate it. Model items with prices, quantities and a fixed spending limit. Apply the chapter rule—a main worktree and linked worktrees share most repository data while each has its own checked-out files, index and HEAD. Before using a tool, state what remains unchanged, what is being varied, and which visible result would disprove the prediction.

Explained answer. Begin from the rule, not from a guessed output. The listing shows paths, commits and branch associations. In the canteen budget setting, inspect the earliest point where calling each linked worktree a separate repository could occur. The safe procedure is: Label shared objects and refs separately from per-worktree HEAD, index and files. If the data contains an empty value, a duplicate identity, a nested control, an unexpected ancestor or an unavailable path, pause and decide whether the chapter’s default policy still applies. This makes the exercise a transfer test rather than a cosmetic renaming of variables.

Diagnostic route

  • If the vocabulary is unclear: ask the learner to point to the concrete element represented by each noun in the rule.
  • If the prediction is wrong: find the first state where the written trace differs from the observed trace.
  • If the output is right but the explanation is weak: introduce one near-miss that triggers calling each linked worktree a separate repository.
  • If the example is easy: transfer it to a second context and require the learner to name the invariant.
  • If the tool behaves differently: consult the linked official documentation and record the relevant version or environment.

A parent does not need to supply the technical answer. Ask: “What did you expect?”, “What evidence changed your mind?”, and “What is the smallest example that keeps the problem?” Those questions protect learner ownership while still making an evening practice session structured and calm.

Practice with an explained answer

Question. Design a tiny reading log example using pages, dates, unfamiliar words and a one-sentence reflection. Make one ordinary case, one boundary case and one case that exposes calling each linked worktree a separate repository. Predict all three, run or inspect them, and state whether the governing idea needs qualification.

Answer guide. A strong response names the chapter rule first: A main worktree and linked worktrees share most repository data while each has its own checked-out files, index and HEAD. It then shows three separate traces, not just three final outputs. The boundary case must sit exactly on a threshold or ownership edge. The near-miss must demonstrate why calling each linked worktree a separate repository is unsafe. The final explanation should conclude with this operational step: Label shared objects and refs separately from per-worktree HEAD, index and files. Different data values are acceptable when the reasoning and evidence remain consistent.

Transfer and decision point

Transfer this chapter to an unfamiliar project by separating mechanism from policy. The mechanism is what the language, browser or Git command does. The policy is what this project intends to preserve. When those are blended, a technically valid operation can still be educationally or operationally wrong. Write both statements, choose a reversible test, and keep important work backed up.

Previous chapter . Contents . Next chapter

CHAPTER 2 OF 20 . Build the model

2. When a worktree is the right tool

Back to contents

Worktrees suit concurrent tasks that need separate files, such as a hotfix beside unfinished feature work. This is the chapter’s governing idea. A learner should be able to restate it in ordinary language, point to the relevant state in an example, and predict the consequence of one controlled change. Those three actions distinguish a working mental model from a phrase copied from a reference page.

The common trap is creating one for every tiny branch without cleanup discipline. That error is informative: it shows which boundary the learner has not yet represented. Correct the earliest wrong assumption, not merely the final line. Name the competing tasks and prove simultaneous checkouts add value.

For a short Punggol home session, use a prediction–observation–explanation cycle. Write the prediction before using the interpreter, browser or terminal. Record the observation exactly. Then write one causal sentence containing “because”. If the sentence only repeats the output, shrink the case until every transition can be named.

Core worked example

git worktree add ../project-hotfix hotfix/login

Reasoning. The linked directory checks out the chosen branch without disturbing the current tree. The important check is not whether the final output looks plausible. Identify the input state, the rule applied, the boundary at which the rule takes effect, and the evidence that would expose a different rule. Then change one part of the example and predict again.

Five deliberate variations

Variation 1: revision planner. First, predict without running anything. Model topics tagged by confidence, next review date and evidence. Apply the chapter rule—worktrees suit concurrent tasks that need separate files, such as a hotfix beside unfinished feature work. Before using a tool, state what remains unchanged, what is being varied, and which visible result would disprove the prediction.

Explained answer. Begin from the rule, not from a guessed output. The linked directory checks out the chosen branch without disturbing the current tree. In the revision planner setting, inspect the earliest point where creating one for every tiny branch without cleanup discipline could occur. The safe procedure is: Name the competing tasks and prove simultaneous checkouts add value. If the data contains an empty value, a duplicate identity, a nested control, an unexpected ancestor or an unavailable path, pause and decide whether the chapter’s default policy still applies. This makes the exercise a transfer test rather than a cosmetic renaming of variables.

Variation 2: canteen budget. Next, isolate one variable and hold the others constant. Model items with prices, quantities and a fixed spending limit. Apply the chapter rule—worktrees suit concurrent tasks that need separate files, such as a hotfix beside unfinished feature work. Before using a tool, state what remains unchanged, what is being varied, and which visible result would disprove the prediction.

Explained answer. Begin from the rule, not from a guessed output. The linked directory checks out the chosen branch without disturbing the current tree. In the canteen budget setting, inspect the earliest point where creating one for every tiny branch without cleanup discipline could occur. The safe procedure is: Name the competing tasks and prove simultaneous checkouts add value. If the data contains an empty value, a duplicate identity, a nested control, an unexpected ancestor or an unavailable path, pause and decide whether the chapter’s default policy still applies. This makes the exercise a transfer test rather than a cosmetic renaming of variables.

Variation 3: weather journal. Now, test a boundary that a comfortable example would hide. Model daily observations with temperature, rain and a written note. Apply the chapter rule—worktrees suit concurrent tasks that need separate files, such as a hotfix beside unfinished feature work. Before using a tool, state what remains unchanged, what is being varied, and which visible result would disprove the prediction.

Explained answer. Begin from the rule, not from a guessed output. The linked directory checks out the chosen branch without disturbing the current tree. In the weather journal setting, inspect the earliest point where creating one for every tiny branch without cleanup discipline could occur. The safe procedure is: Name the competing tasks and prove simultaneous checkouts add value. If the data contains an empty value, a duplicate identity, a nested control, an unexpected ancestor or an unavailable path, pause and decide whether the chapter’s default policy still applies. This makes the exercise a transfer test rather than a cosmetic renaming of variables.

Variation 4: reading log. Then, explain the result to a study partner without using jargon as a substitute for cause. Model pages, dates, unfamiliar words and a one-sentence reflection. Apply the chapter rule—worktrees suit concurrent tasks that need separate files, such as a hotfix beside unfinished feature work. Before using a tool, state what remains unchanged, what is being varied, and which visible result would disprove the prediction.

Explained answer. Begin from the rule, not from a guessed output. The linked directory checks out the chosen branch without disturbing the current tree. In the reading log setting, inspect the earliest point where creating one for every tiny branch without cleanup discipline could occur. The safe procedure is: Name the competing tasks and prove simultaneous checkouts add value. If the data contains an empty value, a duplicate identity, a nested control, an unexpected ancestor or an unavailable path, pause and decide whether the chapter’s default policy still applies. This makes the exercise a transfer test rather than a cosmetic renaming of variables.

Variation 5: project board. Finally, transfer the rule to a new setting and state what would invalidate it. Model tasks moving among planned, doing, review and done states. Apply the chapter rule—worktrees suit concurrent tasks that need separate files, such as a hotfix beside unfinished feature work. Before using a tool, state what remains unchanged, what is being varied, and which visible result would disprove the prediction.

Explained answer. Begin from the rule, not from a guessed output. The linked directory checks out the chosen branch without disturbing the current tree. In the project board setting, inspect the earliest point where creating one for every tiny branch without cleanup discipline could occur. The safe procedure is: Name the competing tasks and prove simultaneous checkouts add value. If the data contains an empty value, a duplicate identity, a nested control, an unexpected ancestor or an unavailable path, pause and decide whether the chapter’s default policy still applies. This makes the exercise a transfer test rather than a cosmetic renaming of variables.

Diagnostic route

  • If the vocabulary is unclear: ask the learner to point to the concrete element represented by each noun in the rule.
  • If the prediction is wrong: find the first state where the written trace differs from the observed trace.
  • If the output is right but the explanation is weak: introduce one near-miss that triggers creating one for every tiny branch without cleanup discipline.
  • If the example is easy: transfer it to a second context and require the learner to name the invariant.
  • If the tool behaves differently: consult the linked official documentation and record the relevant version or environment.

A parent does not need to supply the technical answer. Ask: “What did you expect?”, “What evidence changed your mind?”, and “What is the smallest example that keeps the problem?” Those questions protect learner ownership while still making an evening practice session structured and calm.

Practice with an explained answer

Question. Design a tiny project board example using tasks moving among planned, doing, review and done states. Make one ordinary case, one boundary case and one case that exposes creating one for every tiny branch without cleanup discipline. Predict all three, run or inspect them, and state whether the governing idea needs qualification.

Answer guide. A strong response names the chapter rule first: Worktrees suit concurrent tasks that need separate files, such as a hotfix beside unfinished feature work. It then shows three separate traces, not just three final outputs. The boundary case must sit exactly on a threshold or ownership edge. The near-miss must demonstrate why creating one for every tiny branch without cleanup discipline is unsafe. The final explanation should conclude with this operational step: Name the competing tasks and prove simultaneous checkouts add value. Different data values are acceptable when the reasoning and evidence remain consistent.

Transfer and decision point

Transfer this chapter to an unfamiliar project by separating mechanism from policy. The mechanism is what the language, browser or Git command does. The policy is what this project intends to preserve. When those are blended, a technically valid operation can still be educationally or operationally wrong. Write both statements, choose a reversible test, and keep important work backed up.

Previous chapter . Contents . Next chapter

CHAPTER 3 OF 20 . Build the model

3. Adding a new branch

Back to contents

git worktree add -b can create a branch and check it out in the new directory in one controlled operation. This is the chapter’s governing idea. A learner should be able to restate it in ordinary language, point to the relevant state in an example, and predict the consequence of one controlled change. Those three actions distinguish a working mental model from a phrase copied from a reference page.

The common trap is creating the branch from the wrong starting commit. That error is informative: it shows which boundary the learner has not yet represented. Correct the earliest wrong assumption, not merely the final line. Name and verify the intended base before adding.

For a short Punggol home session, use a prediction–observation–explanation cycle. Write the prediction before using the interpreter, browser or terminal. Record the observation exactly. Then write one causal sentence containing “because”. If the sentence only repeats the output, shrink the case until every transition can be named.

Core worked example

git worktree add -b docs-nav ../project-docs main

Reasoning. docs-nav starts from main and is checked out in the linked path. The important check is not whether the final output looks plausible. Identify the input state, the rule applied, the boundary at which the rule takes effect, and the evidence that would expose a different rule. Then change one part of the example and predict again.

Five deliberate variations

Variation 1: reading log. First, predict without running anything. Model pages, dates, unfamiliar words and a one-sentence reflection. Apply the chapter rule—git worktree add -b can create a branch and check it out in the new directory in one controlled operation. Before using a tool, state what remains unchanged, what is being varied, and which visible result would disprove the prediction.

Explained answer. Begin from the rule, not from a guessed output. docs-nav starts from main and is checked out in the linked path. In the reading log setting, inspect the earliest point where creating the branch from the wrong starting commit could occur. The safe procedure is: Name and verify the intended base before adding. If the data contains an empty value, a duplicate identity, a nested control, an unexpected ancestor or an unavailable path, pause and decide whether the chapter’s default policy still applies. This makes the exercise a transfer test rather than a cosmetic renaming of variables.

Variation 2: project board. Next, isolate one variable and hold the others constant. Model tasks moving among planned, doing, review and done states. Apply the chapter rule—git worktree add -b can create a branch and check it out in the new directory in one controlled operation. Before using a tool, state what remains unchanged, what is being varied, and which visible result would disprove the prediction.

Explained answer. Begin from the rule, not from a guessed output. docs-nav starts from main and is checked out in the linked path. In the project board setting, inspect the earliest point where creating the branch from the wrong starting commit could occur. The safe procedure is: Name and verify the intended base before adding. If the data contains an empty value, a duplicate identity, a nested control, an unexpected ancestor or an unavailable path, pause and decide whether the chapter’s default policy still applies. This makes the exercise a transfer test rather than a cosmetic renaming of variables.

Variation 3: homework tracker. Now, test a boundary that a comfortable example would hide. Model a short list of assignments with subject, due date and completion state. Apply the chapter rule—git worktree add -b can create a branch and check it out in the new directory in one controlled operation. Before using a tool, state what remains unchanged, what is being varied, and which visible result would disprove the prediction.

Explained answer. Begin from the rule, not from a guessed output. docs-nav starts from main and is checked out in the linked path. In the homework tracker setting, inspect the earliest point where creating the branch from the wrong starting commit could occur. The safe procedure is: Name and verify the intended base before adding. If the data contains an empty value, a duplicate identity, a nested control, an unexpected ancestor or an unavailable path, pause and decide whether the chapter’s default policy still applies. This makes the exercise a transfer test rather than a cosmetic renaming of variables.

Variation 4: library search. Then, explain the result to a study partner without using jargon as a substitute for cause. Model book records with title, topic, shelf code and availability. Apply the chapter rule—git worktree add -b can create a branch and check it out in the new directory in one controlled operation. Before using a tool, state what remains unchanged, what is being varied, and which visible result would disprove the prediction.

Explained answer. Begin from the rule, not from a guessed output. docs-nav starts from main and is checked out in the linked path. In the library search setting, inspect the earliest point where creating the branch from the wrong starting commit could occur. The safe procedure is: Name and verify the intended base before adding. If the data contains an empty value, a duplicate identity, a nested control, an unexpected ancestor or an unavailable path, pause and decide whether the chapter’s default policy still applies. This makes the exercise a transfer test rather than a cosmetic renaming of variables.

Variation 5: CCA sign-up. Finally, transfer the rule to a new setting and state what would invalidate it. Model activity rows with a name, weekday, capacity and registered pupils. Apply the chapter rule—git worktree add -b can create a branch and check it out in the new directory in one controlled operation. Before using a tool, state what remains unchanged, what is being varied, and which visible result would disprove the prediction.

Explained answer. Begin from the rule, not from a guessed output. docs-nav starts from main and is checked out in the linked path. In the CCA sign-up setting, inspect the earliest point where creating the branch from the wrong starting commit could occur. The safe procedure is: Name and verify the intended base before adding. If the data contains an empty value, a duplicate identity, a nested control, an unexpected ancestor or an unavailable path, pause and decide whether the chapter’s default policy still applies. This makes the exercise a transfer test rather than a cosmetic renaming of variables.

Diagnostic route

  • If the vocabulary is unclear: ask the learner to point to the concrete element represented by each noun in the rule.
  • If the prediction is wrong: find the first state where the written trace differs from the observed trace.
  • If the output is right but the explanation is weak: introduce one near-miss that triggers creating the branch from the wrong starting commit.
  • If the example is easy: transfer it to a second context and require the learner to name the invariant.
  • If the tool behaves differently: consult the linked official documentation and record the relevant version or environment.

A parent does not need to supply the technical answer. Ask: “What did you expect?”, “What evidence changed your mind?”, and “What is the smallest example that keeps the problem?” Those questions protect learner ownership while still making an evening practice session structured and calm.

Practice with an explained answer

Question. Design a tiny homework tracker example using a short list of assignments with subject, due date and completion state. Make one ordinary case, one boundary case and one case that exposes creating the branch from the wrong starting commit. Predict all three, run or inspect them, and state whether the governing idea needs qualification.

Answer guide. A strong response names the chapter rule first: git worktree add -b can create a branch and check it out in the new directory in one controlled operation. It then shows three separate traces, not just three final outputs. The boundary case must sit exactly on a threshold or ownership edge. The near-miss must demonstrate why creating the branch from the wrong starting commit is unsafe. The final explanation should conclude with this operational step: Name and verify the intended base before adding. Different data values are acceptable when the reasoning and evidence remain consistent.

Transfer and decision point

Transfer this chapter to an unfamiliar project by separating mechanism from policy. The mechanism is what the language, browser or Git command does. The policy is what this project intends to preserve. When those are blended, a technically valid operation can still be educationally or operationally wrong. Write both statements, choose a reversible test, and keep important work backed up.

Previous chapter . Contents . Next chapter

CHAPTER 4 OF 20 . Build the model

4. Adding an existing branch

Back to contents

An existing branch can be checked out only when Git’s branch-occupancy rules permit it. This is the chapter’s governing idea. A learner should be able to restate it in ordinary language, point to the relevant state in an example, and predict the consequence of one controlled change. Those three actions distinguish a working mental model from a phrase copied from a reference page.

The common trap is trying to check out the same branch in two worktrees. That error is informative: it shows which boundary the learner has not yet represented. Correct the earliest wrong assumption, not merely the final line. Run worktree list and choose a distinct branch or detached state.

For a short Punggol home session, use a prediction–observation–explanation cycle. Write the prediction before using the interpreter, browser or terminal. Record the observation exactly. Then write one causal sentence containing “because”. If the sentence only repeats the output, shrink the case until every transition can be named.

Core worked example

git worktree add ../project-review review/alex

Reasoning. The review branch receives its own working directory. The important check is not whether the final output looks plausible. Identify the input state, the rule applied, the boundary at which the rule takes effect, and the evidence that would expose a different rule. Then change one part of the example and predict again.

Five deliberate variations

Variation 1: library search. First, predict without running anything. Model book records with title, topic, shelf code and availability. Apply the chapter rule—an existing branch can be checked out only when Git’s branch-occupancy rules permit it. Before using a tool, state what remains unchanged, what is being varied, and which visible result would disprove the prediction.

Explained answer. Begin from the rule, not from a guessed output. The review branch receives its own working directory. In the library search setting, inspect the earliest point where trying to check out the same branch in two worktrees could occur. The safe procedure is: Run worktree list and choose a distinct branch or detached state. If the data contains an empty value, a duplicate identity, a nested control, an unexpected ancestor or an unavailable path, pause and decide whether the chapter’s default policy still applies. This makes the exercise a transfer test rather than a cosmetic renaming of variables.

Variation 2: CCA sign-up. Next, isolate one variable and hold the others constant. Model activity rows with a name, weekday, capacity and registered pupils. Apply the chapter rule—an existing branch can be checked out only when Git’s branch-occupancy rules permit it. Before using a tool, state what remains unchanged, what is being varied, and which visible result would disprove the prediction.

Explained answer. Begin from the rule, not from a guessed output. The review branch receives its own working directory. In the CCA sign-up setting, inspect the earliest point where trying to check out the same branch in two worktrees could occur. The safe procedure is: Run worktree list and choose a distinct branch or detached state. If the data contains an empty value, a duplicate identity, a nested control, an unexpected ancestor or an unavailable path, pause and decide whether the chapter’s default policy still applies. This makes the exercise a transfer test rather than a cosmetic renaming of variables.

Variation 3: revision planner. Now, test a boundary that a comfortable example would hide. Model topics tagged by confidence, next review date and evidence. Apply the chapter rule—an existing branch can be checked out only when Git’s branch-occupancy rules permit it. Before using a tool, state what remains unchanged, what is being varied, and which visible result would disprove the prediction.

Explained answer. Begin from the rule, not from a guessed output. The review branch receives its own working directory. In the revision planner setting, inspect the earliest point where trying to check out the same branch in two worktrees could occur. The safe procedure is: Run worktree list and choose a distinct branch or detached state. If the data contains an empty value, a duplicate identity, a nested control, an unexpected ancestor or an unavailable path, pause and decide whether the chapter’s default policy still applies. This makes the exercise a transfer test rather than a cosmetic renaming of variables.

Variation 4: canteen budget. Then, explain the result to a study partner without using jargon as a substitute for cause. Model items with prices, quantities and a fixed spending limit. Apply the chapter rule—an existing branch can be checked out only when Git’s branch-occupancy rules permit it. Before using a tool, state what remains unchanged, what is being varied, and which visible result would disprove the prediction.

Explained answer. Begin from the rule, not from a guessed output. The review branch receives its own working directory. In the canteen budget setting, inspect the earliest point where trying to check out the same branch in two worktrees could occur. The safe procedure is: Run worktree list and choose a distinct branch or detached state. If the data contains an empty value, a duplicate identity, a nested control, an unexpected ancestor or an unavailable path, pause and decide whether the chapter’s default policy still applies. This makes the exercise a transfer test rather than a cosmetic renaming of variables.

Variation 5: weather journal. Finally, transfer the rule to a new setting and state what would invalidate it. Model daily observations with temperature, rain and a written note. Apply the chapter rule—an existing branch can be checked out only when Git’s branch-occupancy rules permit it. Before using a tool, state what remains unchanged, what is being varied, and which visible result would disprove the prediction.

Explained answer. Begin from the rule, not from a guessed output. The review branch receives its own working directory. In the weather journal setting, inspect the earliest point where trying to check out the same branch in two worktrees could occur. The safe procedure is: Run worktree list and choose a distinct branch or detached state. If the data contains an empty value, a duplicate identity, a nested control, an unexpected ancestor or an unavailable path, pause and decide whether the chapter’s default policy still applies. This makes the exercise a transfer test rather than a cosmetic renaming of variables.

Diagnostic route

  • If the vocabulary is unclear: ask the learner to point to the concrete element represented by each noun in the rule.
  • If the prediction is wrong: find the first state where the written trace differs from the observed trace.
  • If the output is right but the explanation is weak: introduce one near-miss that triggers trying to check out the same branch in two worktrees.
  • If the example is easy: transfer it to a second context and require the learner to name the invariant.
  • If the tool behaves differently: consult the linked official documentation and record the relevant version or environment.

A parent does not need to supply the technical answer. Ask: “What did you expect?”, “What evidence changed your mind?”, and “What is the smallest example that keeps the problem?” Those questions protect learner ownership while still making an evening practice session structured and calm.

Practice with an explained answer

Question. Design a tiny library search example using book records with title, topic, shelf code and availability. Make one ordinary case, one boundary case and one case that exposes trying to check out the same branch in two worktrees. Predict all three, run or inspect them, and state whether the governing idea needs qualification.

Answer guide. A strong response names the chapter rule first: An existing branch can be checked out only when Git’s branch-occupancy rules permit it. It then shows three separate traces, not just three final outputs. The boundary case must sit exactly on a threshold or ownership edge. The near-miss must demonstrate why trying to check out the same branch in two worktrees is unsafe. The final explanation should conclude with this operational step: Run worktree list and choose a distinct branch or detached state. Different data values are acceptable when the reasoning and evidence remain consistent.

Transfer and decision point

Transfer this chapter to an unfamiliar project by separating mechanism from policy. The mechanism is what the language, browser or Git command does. The policy is what this project intends to preserve. When those are blended, a technically valid operation can still be educationally or operationally wrong. Write both statements, choose a reversible test, and keep important work backed up.

Previous chapter . Contents . Next chapter

CHAPTER 5 OF 20 . Use the core tools

5. Detached worktrees

Back to contents

A detached worktree checks out a commit without attaching HEAD to a local branch, useful for inspection or testing. This is the chapter’s governing idea. A learner should be able to restate it in ordinary language, point to the relevant state in an example, and predict the consequence of one controlled change. Those three actions distinguish a working mental model from a phrase copied from a reference page.

The common trap is making valuable commits in detached state and forgetting to name them. That error is informative: it shows which boundary the learner has not yet represented. Correct the earliest wrong assumption, not merely the final line. Create a branch before leaving if any detached commit must be retained.

For a short Punggol home session, use a prediction–observation–explanation cycle. Write the prediction before using the interpreter, browser or terminal. Record the observation exactly. Then write one causal sentence containing “because”. If the sentence only repeats the output, shrink the case until every transition can be named.

Core worked example

git worktree add --detach ../project-old v2.1.0

Reasoning. The tag is inspected without moving an existing branch. The important check is not whether the final output looks plausible. Identify the input state, the rule applied, the boundary at which the rule takes effect, and the evidence that would expose a different rule. Then change one part of the example and predict again.

Five deliberate variations

Variation 1: canteen budget. First, predict without running anything. Model items with prices, quantities and a fixed spending limit. Apply the chapter rule—a detached worktree checks out a commit without attaching HEAD to a local branch, useful for inspection or testing. Before using a tool, state what remains unchanged, what is being varied, and which visible result would disprove the prediction.

Explained answer. Begin from the rule, not from a guessed output. The tag is inspected without moving an existing branch. In the canteen budget setting, inspect the earliest point where making valuable commits in detached state and forgetting to name them could occur. The safe procedure is: Create a branch before leaving if any detached commit must be retained. If the data contains an empty value, a duplicate identity, a nested control, an unexpected ancestor or an unavailable path, pause and decide whether the chapter’s default policy still applies. This makes the exercise a transfer test rather than a cosmetic renaming of variables.

Variation 2: weather journal. Next, isolate one variable and hold the others constant. Model daily observations with temperature, rain and a written note. Apply the chapter rule—a detached worktree checks out a commit without attaching HEAD to a local branch, useful for inspection or testing. Before using a tool, state what remains unchanged, what is being varied, and which visible result would disprove the prediction.

Explained answer. Begin from the rule, not from a guessed output. The tag is inspected without moving an existing branch. In the weather journal setting, inspect the earliest point where making valuable commits in detached state and forgetting to name them could occur. The safe procedure is: Create a branch before leaving if any detached commit must be retained. If the data contains an empty value, a duplicate identity, a nested control, an unexpected ancestor or an unavailable path, pause and decide whether the chapter’s default policy still applies. This makes the exercise a transfer test rather than a cosmetic renaming of variables.

Variation 3: reading log. Now, test a boundary that a comfortable example would hide. Model pages, dates, unfamiliar words and a one-sentence reflection. Apply the chapter rule—a detached worktree checks out a commit without attaching HEAD to a local branch, useful for inspection or testing. Before using a tool, state what remains unchanged, what is being varied, and which visible result would disprove the prediction.

Explained answer. Begin from the rule, not from a guessed output. The tag is inspected without moving an existing branch. In the reading log setting, inspect the earliest point where making valuable commits in detached state and forgetting to name them could occur. The safe procedure is: Create a branch before leaving if any detached commit must be retained. If the data contains an empty value, a duplicate identity, a nested control, an unexpected ancestor or an unavailable path, pause and decide whether the chapter’s default policy still applies. This makes the exercise a transfer test rather than a cosmetic renaming of variables.

Variation 4: project board. Then, explain the result to a study partner without using jargon as a substitute for cause. Model tasks moving among planned, doing, review and done states. Apply the chapter rule—a detached worktree checks out a commit without attaching HEAD to a local branch, useful for inspection or testing. Before using a tool, state what remains unchanged, what is being varied, and which visible result would disprove the prediction.

Explained answer. Begin from the rule, not from a guessed output. The tag is inspected without moving an existing branch. In the project board setting, inspect the earliest point where making valuable commits in detached state and forgetting to name them could occur. The safe procedure is: Create a branch before leaving if any detached commit must be retained. If the data contains an empty value, a duplicate identity, a nested control, an unexpected ancestor or an unavailable path, pause and decide whether the chapter’s default policy still applies. This makes the exercise a transfer test rather than a cosmetic renaming of variables.

Variation 5: homework tracker. Finally, transfer the rule to a new setting and state what would invalidate it. Model a short list of assignments with subject, due date and completion state. Apply the chapter rule—a detached worktree checks out a commit without attaching HEAD to a local branch, useful for inspection or testing. Before using a tool, state what remains unchanged, what is being varied, and which visible result would disprove the prediction.

Explained answer. Begin from the rule, not from a guessed output. The tag is inspected without moving an existing branch. In the homework tracker setting, inspect the earliest point where making valuable commits in detached state and forgetting to name them could occur. The safe procedure is: Create a branch before leaving if any detached commit must be retained. If the data contains an empty value, a duplicate identity, a nested control, an unexpected ancestor or an unavailable path, pause and decide whether the chapter’s default policy still applies. This makes the exercise a transfer test rather than a cosmetic renaming of variables.

Diagnostic route

  • If the vocabulary is unclear: ask the learner to point to the concrete element represented by each noun in the rule.
  • If the prediction is wrong: find the first state where the written trace differs from the observed trace.
  • If the output is right but the explanation is weak: introduce one near-miss that triggers making valuable commits in detached state and forgetting to name them.
  • If the example is easy: transfer it to a second context and require the learner to name the invariant.
  • If the tool behaves differently: consult the linked official documentation and record the relevant version or environment.

A parent does not need to supply the technical answer. Ask: “What did you expect?”, “What evidence changed your mind?”, and “What is the smallest example that keeps the problem?” Those questions protect learner ownership while still making an evening practice session structured and calm.

Practice with an explained answer

Question. Design a tiny CCA sign-up example using activity rows with a name, weekday, capacity and registered pupils. Make one ordinary case, one boundary case and one case that exposes making valuable commits in detached state and forgetting to name them. Predict all three, run or inspect them, and state whether the governing idea needs qualification.

Answer guide. A strong response names the chapter rule first: A detached worktree checks out a commit without attaching HEAD to a local branch, useful for inspection or testing. It then shows three separate traces, not just three final outputs. The boundary case must sit exactly on a threshold or ownership edge. The near-miss must demonstrate why making valuable commits in detached state and forgetting to name them is unsafe. The final explanation should conclude with this operational step: Create a branch before leaving if any detached commit must be retained. Different data values are acceptable when the reasoning and evidence remain consistent.

Transfer and decision point

Transfer this chapter to an unfamiliar project by separating mechanism from policy. The mechanism is what the language, browser or Git command does. The policy is what this project intends to preserve. When those are blended, a technically valid operation can still be educationally or operationally wrong. Write both statements, choose a reversible test, and keep important work backed up.

Previous chapter . Contents . Next chapter

CHAPTER 6 OF 20 . Use the core tools

6. Branch occupancy and safety

Back to contents

Git normally prevents one branch from being checked out in multiple worktrees because concurrent edits would make the branch state ambiguous. This is the chapter’s governing idea. A learner should be able to restate it in ordinary language, point to the relevant state in an example, and predict the consequence of one controlled change. Those three actions distinguish a working mental model from a phrase copied from a reference page.

The common trap is using force before understanding which worktree owns the branch. That error is informative: it shows which boundary the learner has not yet represented. Correct the earliest wrong assumption, not merely the final line. Locate the existing worktree and decide which checkout should remain attached.

For a short Punggol home session, use a prediction–observation–explanation cycle. Write the prediction before using the interpreter, browser or terminal. Record the observation exactly. Then write one causal sentence containing “because”. If the sentence only repeats the output, shrink the case until every transition can be named.

Core worked example

git worktree list --porcelain

Reasoning. Machine-readable output makes branch ownership explicit. The important check is not whether the final output looks plausible. Identify the input state, the rule applied, the boundary at which the rule takes effect, and the evidence that would expose a different rule. Then change one part of the example and predict again.

Five deliberate variations

Variation 1: project board. First, predict without running anything. Model tasks moving among planned, doing, review and done states. Apply the chapter rule—git normally prevents one branch from being checked out in multiple worktrees because concurrent edits would make the branch state ambiguous. Before using a tool, state what remains unchanged, what is being varied, and which visible result would disprove the prediction.

Explained answer. Begin from the rule, not from a guessed output. Machine-readable output makes branch ownership explicit. In the project board setting, inspect the earliest point where using force before understanding which worktree owns the branch could occur. The safe procedure is: Locate the existing worktree and decide which checkout should remain attached. If the data contains an empty value, a duplicate identity, a nested control, an unexpected ancestor or an unavailable path, pause and decide whether the chapter’s default policy still applies. This makes the exercise a transfer test rather than a cosmetic renaming of variables.

Variation 2: homework tracker. Next, isolate one variable and hold the others constant. Model a short list of assignments with subject, due date and completion state. Apply the chapter rule—git normally prevents one branch from being checked out in multiple worktrees because concurrent edits would make the branch state ambiguous. Before using a tool, state what remains unchanged, what is being varied, and which visible result would disprove the prediction.

Explained answer. Begin from the rule, not from a guessed output. Machine-readable output makes branch ownership explicit. In the homework tracker setting, inspect the earliest point where using force before understanding which worktree owns the branch could occur. The safe procedure is: Locate the existing worktree and decide which checkout should remain attached. If the data contains an empty value, a duplicate identity, a nested control, an unexpected ancestor or an unavailable path, pause and decide whether the chapter’s default policy still applies. This makes the exercise a transfer test rather than a cosmetic renaming of variables.

Variation 3: library search. Now, test a boundary that a comfortable example would hide. Model book records with title, topic, shelf code and availability. Apply the chapter rule—git normally prevents one branch from being checked out in multiple worktrees because concurrent edits would make the branch state ambiguous. Before using a tool, state what remains unchanged, what is being varied, and which visible result would disprove the prediction.

Explained answer. Begin from the rule, not from a guessed output. Machine-readable output makes branch ownership explicit. In the library search setting, inspect the earliest point where using force before understanding which worktree owns the branch could occur. The safe procedure is: Locate the existing worktree and decide which checkout should remain attached. If the data contains an empty value, a duplicate identity, a nested control, an unexpected ancestor or an unavailable path, pause and decide whether the chapter’s default policy still applies. This makes the exercise a transfer test rather than a cosmetic renaming of variables.

Variation 4: CCA sign-up. Then, explain the result to a study partner without using jargon as a substitute for cause. Model activity rows with a name, weekday, capacity and registered pupils. Apply the chapter rule—git normally prevents one branch from being checked out in multiple worktrees because concurrent edits would make the branch state ambiguous. Before using a tool, state what remains unchanged, what is being varied, and which visible result would disprove the prediction.

Explained answer. Begin from the rule, not from a guessed output. Machine-readable output makes branch ownership explicit. In the CCA sign-up setting, inspect the earliest point where using force before understanding which worktree owns the branch could occur. The safe procedure is: Locate the existing worktree and decide which checkout should remain attached. If the data contains an empty value, a duplicate identity, a nested control, an unexpected ancestor or an unavailable path, pause and decide whether the chapter’s default policy still applies. This makes the exercise a transfer test rather than a cosmetic renaming of variables.

Variation 5: revision planner. Finally, transfer the rule to a new setting and state what would invalidate it. Model topics tagged by confidence, next review date and evidence. Apply the chapter rule—git normally prevents one branch from being checked out in multiple worktrees because concurrent edits would make the branch state ambiguous. Before using a tool, state what remains unchanged, what is being varied, and which visible result would disprove the prediction.

Explained answer. Begin from the rule, not from a guessed output. Machine-readable output makes branch ownership explicit. In the revision planner setting, inspect the earliest point where using force before understanding which worktree owns the branch could occur. The safe procedure is: Locate the existing worktree and decide which checkout should remain attached. If the data contains an empty value, a duplicate identity, a nested control, an unexpected ancestor or an unavailable path, pause and decide whether the chapter’s default policy still applies. This makes the exercise a transfer test rather than a cosmetic renaming of variables.

Diagnostic route

  • If the vocabulary is unclear: ask the learner to point to the concrete element represented by each noun in the rule.
  • If the prediction is wrong: find the first state where the written trace differs from the observed trace.
  • If the output is right but the explanation is weak: introduce one near-miss that triggers using force before understanding which worktree owns the branch.
  • If the example is easy: transfer it to a second context and require the learner to name the invariant.
  • If the tool behaves differently: consult the linked official documentation and record the relevant version or environment.

A parent does not need to supply the technical answer. Ask: “What did you expect?”, “What evidence changed your mind?”, and “What is the smallest example that keeps the problem?” Those questions protect learner ownership while still making an evening practice session structured and calm.

Practice with an explained answer

Question. Design a tiny revision planner example using topics tagged by confidence, next review date and evidence. Make one ordinary case, one boundary case and one case that exposes using force before understanding which worktree owns the branch. Predict all three, run or inspect them, and state whether the governing idea needs qualification.

Answer guide. A strong response names the chapter rule first: Git normally prevents one branch from being checked out in multiple worktrees because concurrent edits would make the branch state ambiguous. It then shows three separate traces, not just three final outputs. The boundary case must sit exactly on a threshold or ownership edge. The near-miss must demonstrate why using force before understanding which worktree owns the branch is unsafe. The final explanation should conclude with this operational step: Locate the existing worktree and decide which checkout should remain attached. Different data values are acceptable when the reasoning and evidence remain consistent.

Transfer and decision point

Transfer this chapter to an unfamiliar project by separating mechanism from policy. The mechanism is what the language, browser or Git command does. The policy is what this project intends to preserve. When those are blended, a technically valid operation can still be educationally or operationally wrong. Write both statements, choose a reversible test, and keep important work backed up.

Previous chapter . Contents . Next chapter

CHAPTER 7 OF 20 . Use the core tools

7. Reading list output

Back to contents

The human and porcelain formats reveal path, HEAD commit, branch, detached state and lock or prune information. This is the chapter’s governing idea. A learner should be able to restate it in ordinary language, point to the relevant state in an example, and predict the consequence of one controlled change. Those three actions distinguish a working mental model from a phrase copied from a reference page.

The common trap is reading only directory names. That error is informative: it shows which boundary the learner has not yet represented. Correct the earliest wrong assumption, not merely the final line. Verify path, commit and branch before any remove or repair operation.

For a short Punggol home session, use a prediction–observation–explanation cycle. Write the prediction before using the interpreter, browser or terminal. Record the observation exactly. Then write one causal sentence containing “because”. If the sentence only repeats the output, shrink the case until every transition can be named.

Core worked example

git worktree list --porcelain

Reasoning. Blank-line-separated records are suitable for careful scripting. The important check is not whether the final output looks plausible. Identify the input state, the rule applied, the boundary at which the rule takes effect, and the evidence that would expose a different rule. Then change one part of the example and predict again.

Five deliberate variations

Variation 1: CCA sign-up. First, predict without running anything. Model activity rows with a name, weekday, capacity and registered pupils. Apply the chapter rule—the human and porcelain formats reveal path, HEAD commit, branch, detached state and lock or prune information. Before using a tool, state what remains unchanged, what is being varied, and which visible result would disprove the prediction.

Explained answer. Begin from the rule, not from a guessed output. Blank-line-separated records are suitable for careful scripting. In the CCA sign-up setting, inspect the earliest point where reading only directory names could occur. The safe procedure is: Verify path, commit and branch before any remove or repair operation. If the data contains an empty value, a duplicate identity, a nested control, an unexpected ancestor or an unavailable path, pause and decide whether the chapter’s default policy still applies. This makes the exercise a transfer test rather than a cosmetic renaming of variables.

Variation 2: revision planner. Next, isolate one variable and hold the others constant. Model topics tagged by confidence, next review date and evidence. Apply the chapter rule—the human and porcelain formats reveal path, HEAD commit, branch, detached state and lock or prune information. Before using a tool, state what remains unchanged, what is being varied, and which visible result would disprove the prediction.

Explained answer. Begin from the rule, not from a guessed output. Blank-line-separated records are suitable for careful scripting. In the revision planner setting, inspect the earliest point where reading only directory names could occur. The safe procedure is: Verify path, commit and branch before any remove or repair operation. If the data contains an empty value, a duplicate identity, a nested control, an unexpected ancestor or an unavailable path, pause and decide whether the chapter’s default policy still applies. This makes the exercise a transfer test rather than a cosmetic renaming of variables.

Variation 3: canteen budget. Now, test a boundary that a comfortable example would hide. Model items with prices, quantities and a fixed spending limit. Apply the chapter rule—the human and porcelain formats reveal path, HEAD commit, branch, detached state and lock or prune information. Before using a tool, state what remains unchanged, what is being varied, and which visible result would disprove the prediction.

Explained answer. Begin from the rule, not from a guessed output. Blank-line-separated records are suitable for careful scripting. In the canteen budget setting, inspect the earliest point where reading only directory names could occur. The safe procedure is: Verify path, commit and branch before any remove or repair operation. If the data contains an empty value, a duplicate identity, a nested control, an unexpected ancestor or an unavailable path, pause and decide whether the chapter’s default policy still applies. This makes the exercise a transfer test rather than a cosmetic renaming of variables.

Variation 4: weather journal. Then, explain the result to a study partner without using jargon as a substitute for cause. Model daily observations with temperature, rain and a written note. Apply the chapter rule—the human and porcelain formats reveal path, HEAD commit, branch, detached state and lock or prune information. Before using a tool, state what remains unchanged, what is being varied, and which visible result would disprove the prediction.

Explained answer. Begin from the rule, not from a guessed output. Blank-line-separated records are suitable for careful scripting. In the weather journal setting, inspect the earliest point where reading only directory names could occur. The safe procedure is: Verify path, commit and branch before any remove or repair operation. If the data contains an empty value, a duplicate identity, a nested control, an unexpected ancestor or an unavailable path, pause and decide whether the chapter’s default policy still applies. This makes the exercise a transfer test rather than a cosmetic renaming of variables.

Variation 5: reading log. Finally, transfer the rule to a new setting and state what would invalidate it. Model pages, dates, unfamiliar words and a one-sentence reflection. Apply the chapter rule—the human and porcelain formats reveal path, HEAD commit, branch, detached state and lock or prune information. Before using a tool, state what remains unchanged, what is being varied, and which visible result would disprove the prediction.

Explained answer. Begin from the rule, not from a guessed output. Blank-line-separated records are suitable for careful scripting. In the reading log setting, inspect the earliest point where reading only directory names could occur. The safe procedure is: Verify path, commit and branch before any remove or repair operation. If the data contains an empty value, a duplicate identity, a nested control, an unexpected ancestor or an unavailable path, pause and decide whether the chapter’s default policy still applies. This makes the exercise a transfer test rather than a cosmetic renaming of variables.

Diagnostic route

  • If the vocabulary is unclear: ask the learner to point to the concrete element represented by each noun in the rule.
  • If the prediction is wrong: find the first state where the written trace differs from the observed trace.
  • If the output is right but the explanation is weak: introduce one near-miss that triggers reading only directory names.
  • If the example is easy: transfer it to a second context and require the learner to name the invariant.
  • If the tool behaves differently: consult the linked official documentation and record the relevant version or environment.

A parent does not need to supply the technical answer. Ask: “What did you expect?”, “What evidence changed your mind?”, and “What is the smallest example that keeps the problem?” Those questions protect learner ownership while still making an evening practice session structured and calm.

Practice with an explained answer

Question. Design a tiny canteen budget example using items with prices, quantities and a fixed spending limit. Make one ordinary case, one boundary case and one case that exposes reading only directory names. Predict all three, run or inspect them, and state whether the governing idea needs qualification.

Answer guide. A strong response names the chapter rule first: The human and porcelain formats reveal path, HEAD commit, branch, detached state and lock or prune information. It then shows three separate traces, not just three final outputs. The boundary case must sit exactly on a threshold or ownership edge. The near-miss must demonstrate why reading only directory names is unsafe. The final explanation should conclude with this operational step: Verify path, commit and branch before any remove or repair operation. Different data values are acceptable when the reasoning and evidence remain consistent.

Transfer and decision point

Transfer this chapter to an unfamiliar project by separating mechanism from policy. The mechanism is what the language, browser or Git command does. The policy is what this project intends to preserve. When those are blended, a technically valid operation can still be educationally or operationally wrong. Write both statements, choose a reversible test, and keep important work backed up.

Previous chapter . Contents . Next chapter

CHAPTER 8 OF 20 . Use the core tools

8. Shared and per-worktree state

Back to contents

Objects and most refs are shared, while HEAD and index differ; some refs live under worktrees-specific administration. This is the chapter’s governing idea. A learner should be able to restate it in ordinary language, point to the relevant state in an example, and predict the consequence of one controlled change. Those three actions distinguish a working mental model from a phrase copied from a reference page.

The common trap is editing internal .git paths by hand. That error is informative: it shows which boundary the learner has not yet represented. Correct the earliest wrong assumption, not merely the final line. Use porcelain commands and git rev-parse helpers instead of guessing storage layout.

For a short Punggol home session, use a prediction–observation–explanation cycle. Write the prediction before using the interpreter, browser or terminal. Record the observation exactly. Then write one causal sentence containing “because”. If the sentence only repeats the output, shrink the case until every transition can be named.

Core worked example

git rev-parse --git-common-dir

Reasoning. The command identifies the shared administrative directory. The important check is not whether the final output looks plausible. Identify the input state, the rule applied, the boundary at which the rule takes effect, and the evidence that would expose a different rule. Then change one part of the example and predict again.

Five deliberate variations

Variation 1: weather journal. First, predict without running anything. Model daily observations with temperature, rain and a written note. Apply the chapter rule—objects and most refs are shared, while HEAD and index differ; some refs live under worktrees-specific administration. Before using a tool, state what remains unchanged, what is being varied, and which visible result would disprove the prediction.

Explained answer. Begin from the rule, not from a guessed output. The command identifies the shared administrative directory. In the weather journal setting, inspect the earliest point where editing internal .git paths by hand could occur. The safe procedure is: Use porcelain commands and git rev-parse helpers instead of guessing storage layout. If the data contains an empty value, a duplicate identity, a nested control, an unexpected ancestor or an unavailable path, pause and decide whether the chapter’s default policy still applies. This makes the exercise a transfer test rather than a cosmetic renaming of variables.

Variation 2: reading log. Next, isolate one variable and hold the others constant. Model pages, dates, unfamiliar words and a one-sentence reflection. Apply the chapter rule—objects and most refs are shared, while HEAD and index differ; some refs live under worktrees-specific administration. Before using a tool, state what remains unchanged, what is being varied, and which visible result would disprove the prediction.

Explained answer. Begin from the rule, not from a guessed output. The command identifies the shared administrative directory. In the reading log setting, inspect the earliest point where editing internal .git paths by hand could occur. The safe procedure is: Use porcelain commands and git rev-parse helpers instead of guessing storage layout. If the data contains an empty value, a duplicate identity, a nested control, an unexpected ancestor or an unavailable path, pause and decide whether the chapter’s default policy still applies. This makes the exercise a transfer test rather than a cosmetic renaming of variables.

Variation 3: project board. Now, test a boundary that a comfortable example would hide. Model tasks moving among planned, doing, review and done states. Apply the chapter rule—objects and most refs are shared, while HEAD and index differ; some refs live under worktrees-specific administration. Before using a tool, state what remains unchanged, what is being varied, and which visible result would disprove the prediction.

Explained answer. Begin from the rule, not from a guessed output. The command identifies the shared administrative directory. In the project board setting, inspect the earliest point where editing internal .git paths by hand could occur. The safe procedure is: Use porcelain commands and git rev-parse helpers instead of guessing storage layout. If the data contains an empty value, a duplicate identity, a nested control, an unexpected ancestor or an unavailable path, pause and decide whether the chapter’s default policy still applies. This makes the exercise a transfer test rather than a cosmetic renaming of variables.

Variation 4: homework tracker. Then, explain the result to a study partner without using jargon as a substitute for cause. Model a short list of assignments with subject, due date and completion state. Apply the chapter rule—objects and most refs are shared, while HEAD and index differ; some refs live under worktrees-specific administration. Before using a tool, state what remains unchanged, what is being varied, and which visible result would disprove the prediction.

Explained answer. Begin from the rule, not from a guessed output. The command identifies the shared administrative directory. In the homework tracker setting, inspect the earliest point where editing internal .git paths by hand could occur. The safe procedure is: Use porcelain commands and git rev-parse helpers instead of guessing storage layout. If the data contains an empty value, a duplicate identity, a nested control, an unexpected ancestor or an unavailable path, pause and decide whether the chapter’s default policy still applies. This makes the exercise a transfer test rather than a cosmetic renaming of variables.

Variation 5: library search. Finally, transfer the rule to a new setting and state what would invalidate it. Model book records with title, topic, shelf code and availability. Apply the chapter rule—objects and most refs are shared, while HEAD and index differ; some refs live under worktrees-specific administration. Before using a tool, state what remains unchanged, what is being varied, and which visible result would disprove the prediction.

Explained answer. Begin from the rule, not from a guessed output. The command identifies the shared administrative directory. In the library search setting, inspect the earliest point where editing internal .git paths by hand could occur. The safe procedure is: Use porcelain commands and git rev-parse helpers instead of guessing storage layout. If the data contains an empty value, a duplicate identity, a nested control, an unexpected ancestor or an unavailable path, pause and decide whether the chapter’s default policy still applies. This makes the exercise a transfer test rather than a cosmetic renaming of variables.

Diagnostic route

  • If the vocabulary is unclear: ask the learner to point to the concrete element represented by each noun in the rule.
  • If the prediction is wrong: find the first state where the written trace differs from the observed trace.
  • If the output is right but the explanation is weak: introduce one near-miss that triggers editing internal .git paths by hand.
  • If the example is easy: transfer it to a second context and require the learner to name the invariant.
  • If the tool behaves differently: consult the linked official documentation and record the relevant version or environment.

A parent does not need to supply the technical answer. Ask: “What did you expect?”, “What evidence changed your mind?”, and “What is the smallest example that keeps the problem?” Those questions protect learner ownership while still making an evening practice session structured and calm.

Practice with an explained answer

Question. Design a tiny weather journal example using daily observations with temperature, rain and a written note. Make one ordinary case, one boundary case and one case that exposes editing internal .git paths by hand. Predict all three, run or inspect them, and state whether the governing idea needs qualification.

Answer guide. A strong response names the chapter rule first: Objects and most refs are shared, while HEAD and index differ; some refs live under worktrees-specific administration. It then shows three separate traces, not just three final outputs. The boundary case must sit exactly on a threshold or ownership edge. The near-miss must demonstrate why editing internal .git paths by hand is unsafe. The final explanation should conclude with this operational step: Use porcelain commands and git rev-parse helpers instead of guessing storage layout. Different data values are acceptable when the reasoning and evidence remain consistent.

Transfer and decision point

Transfer this chapter to an unfamiliar project by separating mechanism from policy. The mechanism is what the language, browser or Git command does. The policy is what this project intends to preserve. When those are blended, a technically valid operation can still be educationally or operationally wrong. Write both statements, choose a reversible test, and keep important work backed up.

Previous chapter . Contents . Next chapter

CHAPTER 9 OF 20 . Handle boundaries

9. Removing clean worktrees

Back to contents

git worktree remove removes a linked worktree when safety checks pass; committed branch history remains. This is the chapter’s governing idea. A learner should be able to restate it in ordinary language, point to the relevant state in an example, and predict the consequence of one controlled change. Those three actions distinguish a working mental model from a phrase copied from a reference page.

The common trap is deleting the directory manually and assuming administration is cleaned. That error is informative: it shows which boundary the learner has not yet represented. Correct the earliest wrong assumption, not merely the final line. Check status, remove through Git, then verify the list.

For a short Punggol home session, use a prediction–observation–explanation cycle. Write the prediction before using the interpreter, browser or terminal. Record the observation exactly. Then write one causal sentence containing “because”. If the sentence only repeats the output, shrink the case until every transition can be named.

Core worked example

git worktree remove ../project-review

Reasoning. The linked checkout is deregistered safely when clean. The important check is not whether the final output looks plausible. Identify the input state, the rule applied, the boundary at which the rule takes effect, and the evidence that would expose a different rule. Then change one part of the example and predict again.

Five deliberate variations

Variation 1: homework tracker. First, predict without running anything. Model a short list of assignments with subject, due date and completion state. Apply the chapter rule—git worktree remove removes a linked worktree when safety checks pass; committed branch history remains. Before using a tool, state what remains unchanged, what is being varied, and which visible result would disprove the prediction.

Explained answer. Begin from the rule, not from a guessed output. The linked checkout is deregistered safely when clean. In the homework tracker setting, inspect the earliest point where deleting the directory manually and assuming administration is cleaned could occur. The safe procedure is: Check status, remove through Git, then verify the list. If the data contains an empty value, a duplicate identity, a nested control, an unexpected ancestor or an unavailable path, pause and decide whether the chapter’s default policy still applies. This makes the exercise a transfer test rather than a cosmetic renaming of variables.

Variation 2: library search. Next, isolate one variable and hold the others constant. Model book records with title, topic, shelf code and availability. Apply the chapter rule—git worktree remove removes a linked worktree when safety checks pass; committed branch history remains. Before using a tool, state what remains unchanged, what is being varied, and which visible result would disprove the prediction.

Explained answer. Begin from the rule, not from a guessed output. The linked checkout is deregistered safely when clean. In the library search setting, inspect the earliest point where deleting the directory manually and assuming administration is cleaned could occur. The safe procedure is: Check status, remove through Git, then verify the list. If the data contains an empty value, a duplicate identity, a nested control, an unexpected ancestor or an unavailable path, pause and decide whether the chapter’s default policy still applies. This makes the exercise a transfer test rather than a cosmetic renaming of variables.

Variation 3: CCA sign-up. Now, test a boundary that a comfortable example would hide. Model activity rows with a name, weekday, capacity and registered pupils. Apply the chapter rule—git worktree remove removes a linked worktree when safety checks pass; committed branch history remains. Before using a tool, state what remains unchanged, what is being varied, and which visible result would disprove the prediction.

Explained answer. Begin from the rule, not from a guessed output. The linked checkout is deregistered safely when clean. In the CCA sign-up setting, inspect the earliest point where deleting the directory manually and assuming administration is cleaned could occur. The safe procedure is: Check status, remove through Git, then verify the list. If the data contains an empty value, a duplicate identity, a nested control, an unexpected ancestor or an unavailable path, pause and decide whether the chapter’s default policy still applies. This makes the exercise a transfer test rather than a cosmetic renaming of variables.

Variation 4: revision planner. Then, explain the result to a study partner without using jargon as a substitute for cause. Model topics tagged by confidence, next review date and evidence. Apply the chapter rule—git worktree remove removes a linked worktree when safety checks pass; committed branch history remains. Before using a tool, state what remains unchanged, what is being varied, and which visible result would disprove the prediction.

Explained answer. Begin from the rule, not from a guessed output. The linked checkout is deregistered safely when clean. In the revision planner setting, inspect the earliest point where deleting the directory manually and assuming administration is cleaned could occur. The safe procedure is: Check status, remove through Git, then verify the list. If the data contains an empty value, a duplicate identity, a nested control, an unexpected ancestor or an unavailable path, pause and decide whether the chapter’s default policy still applies. This makes the exercise a transfer test rather than a cosmetic renaming of variables.

Variation 5: canteen budget. Finally, transfer the rule to a new setting and state what would invalidate it. Model items with prices, quantities and a fixed spending limit. Apply the chapter rule—git worktree remove removes a linked worktree when safety checks pass; committed branch history remains. Before using a tool, state what remains unchanged, what is being varied, and which visible result would disprove the prediction.

Explained answer. Begin from the rule, not from a guessed output. The linked checkout is deregistered safely when clean. In the canteen budget setting, inspect the earliest point where deleting the directory manually and assuming administration is cleaned could occur. The safe procedure is: Check status, remove through Git, then verify the list. If the data contains an empty value, a duplicate identity, a nested control, an unexpected ancestor or an unavailable path, pause and decide whether the chapter’s default policy still applies. This makes the exercise a transfer test rather than a cosmetic renaming of variables.

Diagnostic route

  • If the vocabulary is unclear: ask the learner to point to the concrete element represented by each noun in the rule.
  • If the prediction is wrong: find the first state where the written trace differs from the observed trace.
  • If the output is right but the explanation is weak: introduce one near-miss that triggers deleting the directory manually and assuming administration is cleaned.
  • If the example is easy: transfer it to a second context and require the learner to name the invariant.
  • If the tool behaves differently: consult the linked official documentation and record the relevant version or environment.

A parent does not need to supply the technical answer. Ask: “What did you expect?”, “What evidence changed your mind?”, and “What is the smallest example that keeps the problem?” Those questions protect learner ownership while still making an evening practice session structured and calm.

Practice with an explained answer

Question. Design a tiny reading log example using pages, dates, unfamiliar words and a one-sentence reflection. Make one ordinary case, one boundary case and one case that exposes deleting the directory manually and assuming administration is cleaned. Predict all three, run or inspect them, and state whether the governing idea needs qualification.

Answer guide. A strong response names the chapter rule first: git worktree remove removes a linked worktree when safety checks pass; committed branch history remains. It then shows three separate traces, not just three final outputs. The boundary case must sit exactly on a threshold or ownership edge. The near-miss must demonstrate why deleting the directory manually and assuming administration is cleaned is unsafe. The final explanation should conclude with this operational step: Check status, remove through Git, then verify the list. Different data values are acceptable when the reasoning and evidence remain consistent.

Transfer and decision point

Transfer this chapter to an unfamiliar project by separating mechanism from policy. The mechanism is what the language, browser or Git command does. The policy is what this project intends to preserve. When those are blended, a technically valid operation can still be educationally or operationally wrong. Write both statements, choose a reversible test, and keep important work backed up.

Previous chapter . Contents . Next chapter

CHAPTER 10 OF 20 . Handle boundaries

10. Uncommitted changes and force

Back to contents

A modified worktree resists removal to protect work; forcing can destroy uncommitted files. This is the chapter’s governing idea. A learner should be able to restate it in ordinary language, point to the relevant state in an example, and predict the consequence of one controlled change. Those three actions distinguish a working mental model from a phrase copied from a reference page.

The common trap is using –force as the first response. That error is informative: it shows which boundary the learner has not yet represented. Correct the earliest wrong assumption, not merely the final line. Inspect status, commit, stash, copy or discard by an explicit decision.

For a short Punggol home session, use a prediction–observation–explanation cycle. Write the prediction before using the interpreter, browser or terminal. Record the observation exactly. Then write one causal sentence containing “because”. If the sentence only repeats the output, shrink the case until every transition can be named.

Core worked example

git -C ../project-review status --short

Reasoning. The status check identifies what would be lost. The important check is not whether the final output looks plausible. Identify the input state, the rule applied, the boundary at which the rule takes effect, and the evidence that would expose a different rule. Then change one part of the example and predict again.

Five deliberate variations

Variation 1: revision planner. First, predict without running anything. Model topics tagged by confidence, next review date and evidence. Apply the chapter rule—a modified worktree resists removal to protect work; forcing can destroy uncommitted files. Before using a tool, state what remains unchanged, what is being varied, and which visible result would disprove the prediction.

Explained answer. Begin from the rule, not from a guessed output. The status check identifies what would be lost. In the revision planner setting, inspect the earliest point where using –force as the first response could occur. The safe procedure is: Inspect status, commit, stash, copy or discard by an explicit decision. If the data contains an empty value, a duplicate identity, a nested control, an unexpected ancestor or an unavailable path, pause and decide whether the chapter’s default policy still applies. This makes the exercise a transfer test rather than a cosmetic renaming of variables.

Variation 2: canteen budget. Next, isolate one variable and hold the others constant. Model items with prices, quantities and a fixed spending limit. Apply the chapter rule—a modified worktree resists removal to protect work; forcing can destroy uncommitted files. Before using a tool, state what remains unchanged, what is being varied, and which visible result would disprove the prediction.

Explained answer. Begin from the rule, not from a guessed output. The status check identifies what would be lost. In the canteen budget setting, inspect the earliest point where using –force as the first response could occur. The safe procedure is: Inspect status, commit, stash, copy or discard by an explicit decision. If the data contains an empty value, a duplicate identity, a nested control, an unexpected ancestor or an unavailable path, pause and decide whether the chapter’s default policy still applies. This makes the exercise a transfer test rather than a cosmetic renaming of variables.

Variation 3: weather journal. Now, test a boundary that a comfortable example would hide. Model daily observations with temperature, rain and a written note. Apply the chapter rule—a modified worktree resists removal to protect work; forcing can destroy uncommitted files. Before using a tool, state what remains unchanged, what is being varied, and which visible result would disprove the prediction.

Explained answer. Begin from the rule, not from a guessed output. The status check identifies what would be lost. In the weather journal setting, inspect the earliest point where using –force as the first response could occur. The safe procedure is: Inspect status, commit, stash, copy or discard by an explicit decision. If the data contains an empty value, a duplicate identity, a nested control, an unexpected ancestor or an unavailable path, pause and decide whether the chapter’s default policy still applies. This makes the exercise a transfer test rather than a cosmetic renaming of variables.

Variation 4: reading log. Then, explain the result to a study partner without using jargon as a substitute for cause. Model pages, dates, unfamiliar words and a one-sentence reflection. Apply the chapter rule—a modified worktree resists removal to protect work; forcing can destroy uncommitted files. Before using a tool, state what remains unchanged, what is being varied, and which visible result would disprove the prediction.

Explained answer. Begin from the rule, not from a guessed output. The status check identifies what would be lost. In the reading log setting, inspect the earliest point where using –force as the first response could occur. The safe procedure is: Inspect status, commit, stash, copy or discard by an explicit decision. If the data contains an empty value, a duplicate identity, a nested control, an unexpected ancestor or an unavailable path, pause and decide whether the chapter’s default policy still applies. This makes the exercise a transfer test rather than a cosmetic renaming of variables.

Variation 5: project board. Finally, transfer the rule to a new setting and state what would invalidate it. Model tasks moving among planned, doing, review and done states. Apply the chapter rule—a modified worktree resists removal to protect work; forcing can destroy uncommitted files. Before using a tool, state what remains unchanged, what is being varied, and which visible result would disprove the prediction.

Explained answer. Begin from the rule, not from a guessed output. The status check identifies what would be lost. In the project board setting, inspect the earliest point where using –force as the first response could occur. The safe procedure is: Inspect status, commit, stash, copy or discard by an explicit decision. If the data contains an empty value, a duplicate identity, a nested control, an unexpected ancestor or an unavailable path, pause and decide whether the chapter’s default policy still applies. This makes the exercise a transfer test rather than a cosmetic renaming of variables.

Diagnostic route

  • If the vocabulary is unclear: ask the learner to point to the concrete element represented by each noun in the rule.
  • If the prediction is wrong: find the first state where the written trace differs from the observed trace.
  • If the output is right but the explanation is weak: introduce one near-miss that triggers using –force as the first response.
  • If the example is easy: transfer it to a second context and require the learner to name the invariant.
  • If the tool behaves differently: consult the linked official documentation and record the relevant version or environment.

A parent does not need to supply the technical answer. Ask: “What did you expect?”, “What evidence changed your mind?”, and “What is the smallest example that keeps the problem?” Those questions protect learner ownership while still making an evening practice session structured and calm.

Practice with an explained answer

Question. Design a tiny project board example using tasks moving among planned, doing, review and done states. Make one ordinary case, one boundary case and one case that exposes using –force as the first response. Predict all three, run or inspect them, and state whether the governing idea needs qualification.

Answer guide. A strong response names the chapter rule first: A modified worktree resists removal to protect work; forcing can destroy uncommitted files. It then shows three separate traces, not just three final outputs. The boundary case must sit exactly on a threshold or ownership edge. The near-miss must demonstrate why using –force as the first response is unsafe. The final explanation should conclude with this operational step: Inspect status, commit, stash, copy or discard by an explicit decision. Different data values are acceptable when the reasoning and evidence remain consistent.

Transfer and decision point

Transfer this chapter to an unfamiliar project by separating mechanism from policy. The mechanism is what the language, browser or Git command does. The policy is what this project intends to preserve. When those are blended, a technically valid operation can still be educationally or operationally wrong. Write both statements, choose a reversible test, and keep important work backed up.

Previous chapter . Contents . Next chapter

CHAPTER 11 OF 20 . Handle boundaries

11. Pruning stale records

Back to contents

prune cleans administrative records for missing linked paths after an expiry policy or explicit request. This is the chapter’s governing idea. A learner should be able to restate it in ordinary language, point to the relevant state in an example, and predict the consequence of one controlled change. Those three actions distinguish a working mental model from a phrase copied from a reference page.

The common trap is pruning without distinguishing temporarily unavailable storage. That error is informative: it shows which boundary the learner has not yet represented. Correct the earliest wrong assumption, not merely the final line. Use dry-run or verbose inspection and lock worktrees that may disappear temporarily.

For a short Punggol home session, use a prediction–observation–explanation cycle. Write the prediction before using the interpreter, browser or terminal. Record the observation exactly. Then write one causal sentence containing “because”. If the sentence only repeats the output, shrink the case until every transition can be named.

Core worked example

git worktree prune --dry-run --verbose

Reasoning. The preview shows candidates without deleting records. The important check is not whether the final output looks plausible. Identify the input state, the rule applied, the boundary at which the rule takes effect, and the evidence that would expose a different rule. Then change one part of the example and predict again.

Five deliberate variations

Variation 1: reading log. First, predict without running anything. Model pages, dates, unfamiliar words and a one-sentence reflection. Apply the chapter rule—prune cleans administrative records for missing linked paths after an expiry policy or explicit request. Before using a tool, state what remains unchanged, what is being varied, and which visible result would disprove the prediction.

Explained answer. Begin from the rule, not from a guessed output. The preview shows candidates without deleting records. In the reading log setting, inspect the earliest point where pruning without distinguishing temporarily unavailable storage could occur. The safe procedure is: Use dry-run or verbose inspection and lock worktrees that may disappear temporarily. If the data contains an empty value, a duplicate identity, a nested control, an unexpected ancestor or an unavailable path, pause and decide whether the chapter’s default policy still applies. This makes the exercise a transfer test rather than a cosmetic renaming of variables.

Variation 2: project board. Next, isolate one variable and hold the others constant. Model tasks moving among planned, doing, review and done states. Apply the chapter rule—prune cleans administrative records for missing linked paths after an expiry policy or explicit request. Before using a tool, state what remains unchanged, what is being varied, and which visible result would disprove the prediction.

Explained answer. Begin from the rule, not from a guessed output. The preview shows candidates without deleting records. In the project board setting, inspect the earliest point where pruning without distinguishing temporarily unavailable storage could occur. The safe procedure is: Use dry-run or verbose inspection and lock worktrees that may disappear temporarily. If the data contains an empty value, a duplicate identity, a nested control, an unexpected ancestor or an unavailable path, pause and decide whether the chapter’s default policy still applies. This makes the exercise a transfer test rather than a cosmetic renaming of variables.

Variation 3: homework tracker. Now, test a boundary that a comfortable example would hide. Model a short list of assignments with subject, due date and completion state. Apply the chapter rule—prune cleans administrative records for missing linked paths after an expiry policy or explicit request. Before using a tool, state what remains unchanged, what is being varied, and which visible result would disprove the prediction.

Explained answer. Begin from the rule, not from a guessed output. The preview shows candidates without deleting records. In the homework tracker setting, inspect the earliest point where pruning without distinguishing temporarily unavailable storage could occur. The safe procedure is: Use dry-run or verbose inspection and lock worktrees that may disappear temporarily. If the data contains an empty value, a duplicate identity, a nested control, an unexpected ancestor or an unavailable path, pause and decide whether the chapter’s default policy still applies. This makes the exercise a transfer test rather than a cosmetic renaming of variables.

Variation 4: library search. Then, explain the result to a study partner without using jargon as a substitute for cause. Model book records with title, topic, shelf code and availability. Apply the chapter rule—prune cleans administrative records for missing linked paths after an expiry policy or explicit request. Before using a tool, state what remains unchanged, what is being varied, and which visible result would disprove the prediction.

Explained answer. Begin from the rule, not from a guessed output. The preview shows candidates without deleting records. In the library search setting, inspect the earliest point where pruning without distinguishing temporarily unavailable storage could occur. The safe procedure is: Use dry-run or verbose inspection and lock worktrees that may disappear temporarily. If the data contains an empty value, a duplicate identity, a nested control, an unexpected ancestor or an unavailable path, pause and decide whether the chapter’s default policy still applies. This makes the exercise a transfer test rather than a cosmetic renaming of variables.

Variation 5: CCA sign-up. Finally, transfer the rule to a new setting and state what would invalidate it. Model activity rows with a name, weekday, capacity and registered pupils. Apply the chapter rule—prune cleans administrative records for missing linked paths after an expiry policy or explicit request. Before using a tool, state what remains unchanged, what is being varied, and which visible result would disprove the prediction.

Explained answer. Begin from the rule, not from a guessed output. The preview shows candidates without deleting records. In the CCA sign-up setting, inspect the earliest point where pruning without distinguishing temporarily unavailable storage could occur. The safe procedure is: Use dry-run or verbose inspection and lock worktrees that may disappear temporarily. If the data contains an empty value, a duplicate identity, a nested control, an unexpected ancestor or an unavailable path, pause and decide whether the chapter’s default policy still applies. This makes the exercise a transfer test rather than a cosmetic renaming of variables.

Diagnostic route

  • If the vocabulary is unclear: ask the learner to point to the concrete element represented by each noun in the rule.
  • If the prediction is wrong: find the first state where the written trace differs from the observed trace.
  • If the output is right but the explanation is weak: introduce one near-miss that triggers pruning without distinguishing temporarily unavailable storage.
  • If the example is easy: transfer it to a second context and require the learner to name the invariant.
  • If the tool behaves differently: consult the linked official documentation and record the relevant version or environment.

A parent does not need to supply the technical answer. Ask: “What did you expect?”, “What evidence changed your mind?”, and “What is the smallest example that keeps the problem?” Those questions protect learner ownership while still making an evening practice session structured and calm.

Practice with an explained answer

Question. Design a tiny homework tracker example using a short list of assignments with subject, due date and completion state. Make one ordinary case, one boundary case and one case that exposes pruning without distinguishing temporarily unavailable storage. Predict all three, run or inspect them, and state whether the governing idea needs qualification.

Answer guide. A strong response names the chapter rule first: prune cleans administrative records for missing linked paths after an expiry policy or explicit request. It then shows three separate traces, not just three final outputs. The boundary case must sit exactly on a threshold or ownership edge. The near-miss must demonstrate why pruning without distinguishing temporarily unavailable storage is unsafe. The final explanation should conclude with this operational step: Use dry-run or verbose inspection and lock worktrees that may disappear temporarily. Different data values are acceptable when the reasoning and evidence remain consistent.

Transfer and decision point

Transfer this chapter to an unfamiliar project by separating mechanism from policy. The mechanism is what the language, browser or Git command does. The policy is what this project intends to preserve. When those are blended, a technically valid operation can still be educationally or operationally wrong. Write both statements, choose a reversible test, and keep important work backed up.

Previous chapter . Contents . Next chapter

CHAPTER 12 OF 20 . Handle boundaries

12. Locking and unlocking

Back to contents

lock protects a linked worktree record from automatic pruning, especially when its directory may be on removable or intermittently mounted storage. This is the chapter’s governing idea. A learner should be able to restate it in ordinary language, point to the relevant state in an example, and predict the consequence of one controlled change. Those three actions distinguish a working mental model from a phrase copied from a reference page.

The common trap is treating lock as file encryption or edit prevention. That error is informative: it shows which boundary the learner has not yet represented. Correct the earliest wrong assumption, not merely the final line. Attach a reason and document when the lock can be removed.

For a short Punggol home session, use a prediction–observation–explanation cycle. Write the prediction before using the interpreter, browser or terminal. Record the observation exactly. Then write one causal sentence containing “because”. If the sentence only repeats the output, shrink the case until every transition can be named.

Core worked example

git worktree lock --reason 'external drive' ../project-demo

Reasoning. The administrative record is protected from prune. The important check is not whether the final output looks plausible. Identify the input state, the rule applied, the boundary at which the rule takes effect, and the evidence that would expose a different rule. Then change one part of the example and predict again.

Five deliberate variations

Variation 1: library search. First, predict without running anything. Model book records with title, topic, shelf code and availability. Apply the chapter rule—lock protects a linked worktree record from automatic pruning, especially when its directory may be on removable or intermittently mounted storage. Before using a tool, state what remains unchanged, what is being varied, and which visible result would disprove the prediction.

Explained answer. Begin from the rule, not from a guessed output. The administrative record is protected from prune. In the library search setting, inspect the earliest point where treating lock as file encryption or edit prevention could occur. The safe procedure is: Attach a reason and document when the lock can be removed. If the data contains an empty value, a duplicate identity, a nested control, an unexpected ancestor or an unavailable path, pause and decide whether the chapter’s default policy still applies. This makes the exercise a transfer test rather than a cosmetic renaming of variables.

Variation 2: CCA sign-up. Next, isolate one variable and hold the others constant. Model activity rows with a name, weekday, capacity and registered pupils. Apply the chapter rule—lock protects a linked worktree record from automatic pruning, especially when its directory may be on removable or intermittently mounted storage. Before using a tool, state what remains unchanged, what is being varied, and which visible result would disprove the prediction.

Explained answer. Begin from the rule, not from a guessed output. The administrative record is protected from prune. In the CCA sign-up setting, inspect the earliest point where treating lock as file encryption or edit prevention could occur. The safe procedure is: Attach a reason and document when the lock can be removed. If the data contains an empty value, a duplicate identity, a nested control, an unexpected ancestor or an unavailable path, pause and decide whether the chapter’s default policy still applies. This makes the exercise a transfer test rather than a cosmetic renaming of variables.

Variation 3: revision planner. Now, test a boundary that a comfortable example would hide. Model topics tagged by confidence, next review date and evidence. Apply the chapter rule—lock protects a linked worktree record from automatic pruning, especially when its directory may be on removable or intermittently mounted storage. Before using a tool, state what remains unchanged, what is being varied, and which visible result would disprove the prediction.

Explained answer. Begin from the rule, not from a guessed output. The administrative record is protected from prune. In the revision planner setting, inspect the earliest point where treating lock as file encryption or edit prevention could occur. The safe procedure is: Attach a reason and document when the lock can be removed. If the data contains an empty value, a duplicate identity, a nested control, an unexpected ancestor or an unavailable path, pause and decide whether the chapter’s default policy still applies. This makes the exercise a transfer test rather than a cosmetic renaming of variables.

Variation 4: canteen budget. Then, explain the result to a study partner without using jargon as a substitute for cause. Model items with prices, quantities and a fixed spending limit. Apply the chapter rule—lock protects a linked worktree record from automatic pruning, especially when its directory may be on removable or intermittently mounted storage. Before using a tool, state what remains unchanged, what is being varied, and which visible result would disprove the prediction.

Explained answer. Begin from the rule, not from a guessed output. The administrative record is protected from prune. In the canteen budget setting, inspect the earliest point where treating lock as file encryption or edit prevention could occur. The safe procedure is: Attach a reason and document when the lock can be removed. If the data contains an empty value, a duplicate identity, a nested control, an unexpected ancestor or an unavailable path, pause and decide whether the chapter’s default policy still applies. This makes the exercise a transfer test rather than a cosmetic renaming of variables.

Variation 5: weather journal. Finally, transfer the rule to a new setting and state what would invalidate it. Model daily observations with temperature, rain and a written note. Apply the chapter rule—lock protects a linked worktree record from automatic pruning, especially when its directory may be on removable or intermittently mounted storage. Before using a tool, state what remains unchanged, what is being varied, and which visible result would disprove the prediction.

Explained answer. Begin from the rule, not from a guessed output. The administrative record is protected from prune. In the weather journal setting, inspect the earliest point where treating lock as file encryption or edit prevention could occur. The safe procedure is: Attach a reason and document when the lock can be removed. If the data contains an empty value, a duplicate identity, a nested control, an unexpected ancestor or an unavailable path, pause and decide whether the chapter’s default policy still applies. This makes the exercise a transfer test rather than a cosmetic renaming of variables.

Diagnostic route

  • If the vocabulary is unclear: ask the learner to point to the concrete element represented by each noun in the rule.
  • If the prediction is wrong: find the first state where the written trace differs from the observed trace.
  • If the output is right but the explanation is weak: introduce one near-miss that triggers treating lock as file encryption or edit prevention.
  • If the example is easy: transfer it to a second context and require the learner to name the invariant.
  • If the tool behaves differently: consult the linked official documentation and record the relevant version or environment.

A parent does not need to supply the technical answer. Ask: “What did you expect?”, “What evidence changed your mind?”, and “What is the smallest example that keeps the problem?” Those questions protect learner ownership while still making an evening practice session structured and calm.

Practice with an explained answer

Question. Design a tiny library search example using book records with title, topic, shelf code and availability. Make one ordinary case, one boundary case and one case that exposes treating lock as file encryption or edit prevention. Predict all three, run or inspect them, and state whether the governing idea needs qualification.

Answer guide. A strong response names the chapter rule first: lock protects a linked worktree record from automatic pruning, especially when its directory may be on removable or intermittently mounted storage. It then shows three separate traces, not just three final outputs. The boundary case must sit exactly on a threshold or ownership edge. The near-miss must demonstrate why treating lock as file encryption or edit prevention is unsafe. The final explanation should conclude with this operational step: Attach a reason and document when the lock can be removed. Different data values are acceptable when the reasoning and evidence remain consistent.

Transfer and decision point

Transfer this chapter to an unfamiliar project by separating mechanism from policy. The mechanism is what the language, browser or Git command does. The policy is what this project intends to preserve. When those are blended, a technically valid operation can still be educationally or operationally wrong. Write both statements, choose a reversible test, and keep important work backed up.

Previous chapter . Contents . Next chapter

CHAPTER 13 OF 20 . Debug and verify

13. Moving a worktree

Back to contents

move relocates a linked worktree while keeping Git’s records consistent, subject to documented limitations. This is the chapter’s governing idea. A learner should be able to restate it in ordinary language, point to the relevant state in an example, and predict the consequence of one controlled change. Those three actions distinguish a working mental model from a phrase copied from a reference page.

The common trap is moving the folder with a file manager and leaving stale metadata. That error is informative: it shows which boundary the learner has not yet represented. Correct the earliest wrong assumption, not merely the final line. Use git worktree move and verify from both old and new paths.

For a short Punggol home session, use a prediction–observation–explanation cycle. Write the prediction before using the interpreter, browser or terminal. Record the observation exactly. Then write one causal sentence containing “because”. If the sentence only repeats the output, shrink the case until every transition can be named.

Core worked example

git worktree move ../project-demo ../archive/project-demo

Reasoning. Git updates the linked path when the move is supported. The important check is not whether the final output looks plausible. Identify the input state, the rule applied, the boundary at which the rule takes effect, and the evidence that would expose a different rule. Then change one part of the example and predict again.

Five deliberate variations

Variation 1: canteen budget. First, predict without running anything. Model items with prices, quantities and a fixed spending limit. Apply the chapter rule—move relocates a linked worktree while keeping Git’s records consistent, subject to documented limitations. Before using a tool, state what remains unchanged, what is being varied, and which visible result would disprove the prediction.

Explained answer. Begin from the rule, not from a guessed output. Git updates the linked path when the move is supported. In the canteen budget setting, inspect the earliest point where moving the folder with a file manager and leaving stale metadata could occur. The safe procedure is: Use git worktree move and verify from both old and new paths. If the data contains an empty value, a duplicate identity, a nested control, an unexpected ancestor or an unavailable path, pause and decide whether the chapter’s default policy still applies. This makes the exercise a transfer test rather than a cosmetic renaming of variables.

Variation 2: weather journal. Next, isolate one variable and hold the others constant. Model daily observations with temperature, rain and a written note. Apply the chapter rule—move relocates a linked worktree while keeping Git’s records consistent, subject to documented limitations. Before using a tool, state what remains unchanged, what is being varied, and which visible result would disprove the prediction.

Explained answer. Begin from the rule, not from a guessed output. Git updates the linked path when the move is supported. In the weather journal setting, inspect the earliest point where moving the folder with a file manager and leaving stale metadata could occur. The safe procedure is: Use git worktree move and verify from both old and new paths. If the data contains an empty value, a duplicate identity, a nested control, an unexpected ancestor or an unavailable path, pause and decide whether the chapter’s default policy still applies. This makes the exercise a transfer test rather than a cosmetic renaming of variables.

Variation 3: reading log. Now, test a boundary that a comfortable example would hide. Model pages, dates, unfamiliar words and a one-sentence reflection. Apply the chapter rule—move relocates a linked worktree while keeping Git’s records consistent, subject to documented limitations. Before using a tool, state what remains unchanged, what is being varied, and which visible result would disprove the prediction.

Explained answer. Begin from the rule, not from a guessed output. Git updates the linked path when the move is supported. In the reading log setting, inspect the earliest point where moving the folder with a file manager and leaving stale metadata could occur. The safe procedure is: Use git worktree move and verify from both old and new paths. If the data contains an empty value, a duplicate identity, a nested control, an unexpected ancestor or an unavailable path, pause and decide whether the chapter’s default policy still applies. This makes the exercise a transfer test rather than a cosmetic renaming of variables.

Variation 4: project board. Then, explain the result to a study partner without using jargon as a substitute for cause. Model tasks moving among planned, doing, review and done states. Apply the chapter rule—move relocates a linked worktree while keeping Git’s records consistent, subject to documented limitations. Before using a tool, state what remains unchanged, what is being varied, and which visible result would disprove the prediction.

Explained answer. Begin from the rule, not from a guessed output. Git updates the linked path when the move is supported. In the project board setting, inspect the earliest point where moving the folder with a file manager and leaving stale metadata could occur. The safe procedure is: Use git worktree move and verify from both old and new paths. If the data contains an empty value, a duplicate identity, a nested control, an unexpected ancestor or an unavailable path, pause and decide whether the chapter’s default policy still applies. This makes the exercise a transfer test rather than a cosmetic renaming of variables.

Variation 5: homework tracker. Finally, transfer the rule to a new setting and state what would invalidate it. Model a short list of assignments with subject, due date and completion state. Apply the chapter rule—move relocates a linked worktree while keeping Git’s records consistent, subject to documented limitations. Before using a tool, state what remains unchanged, what is being varied, and which visible result would disprove the prediction.

Explained answer. Begin from the rule, not from a guessed output. Git updates the linked path when the move is supported. In the homework tracker setting, inspect the earliest point where moving the folder with a file manager and leaving stale metadata could occur. The safe procedure is: Use git worktree move and verify from both old and new paths. If the data contains an empty value, a duplicate identity, a nested control, an unexpected ancestor or an unavailable path, pause and decide whether the chapter’s default policy still applies. This makes the exercise a transfer test rather than a cosmetic renaming of variables.

Diagnostic route

  • If the vocabulary is unclear: ask the learner to point to the concrete element represented by each noun in the rule.
  • If the prediction is wrong: find the first state where the written trace differs from the observed trace.
  • If the output is right but the explanation is weak: introduce one near-miss that triggers moving the folder with a file manager and leaving stale metadata.
  • If the example is easy: transfer it to a second context and require the learner to name the invariant.
  • If the tool behaves differently: consult the linked official documentation and record the relevant version or environment.

A parent does not need to supply the technical answer. Ask: “What did you expect?”, “What evidence changed your mind?”, and “What is the smallest example that keeps the problem?” Those questions protect learner ownership while still making an evening practice session structured and calm.

Practice with an explained answer

Question. Design a tiny CCA sign-up example using activity rows with a name, weekday, capacity and registered pupils. Make one ordinary case, one boundary case and one case that exposes moving the folder with a file manager and leaving stale metadata. Predict all three, run or inspect them, and state whether the governing idea needs qualification.

Answer guide. A strong response names the chapter rule first: move relocates a linked worktree while keeping Git’s records consistent, subject to documented limitations. It then shows three separate traces, not just three final outputs. The boundary case must sit exactly on a threshold or ownership edge. The near-miss must demonstrate why moving the folder with a file manager and leaving stale metadata is unsafe. The final explanation should conclude with this operational step: Use git worktree move and verify from both old and new paths. Different data values are acceptable when the reasoning and evidence remain consistent.

Transfer and decision point

Transfer this chapter to an unfamiliar project by separating mechanism from policy. The mechanism is what the language, browser or Git command does. The policy is what this project intends to preserve. When those are blended, a technically valid operation can still be educationally or operationally wrong. Write both statements, choose a reversible test, and keep important work backed up.

Previous chapter . Contents . Next chapter

repair can reconnect worktree administrative data after certain manual repository or linked-directory moves. This is the chapter’s governing idea. A learner should be able to restate it in ordinary language, point to the relevant state in an example, and predict the consequence of one controlled change. Those three actions distinguish a working mental model from a phrase copied from a reference page.

The common trap is editing gitdir files before trying the supported repair command. That error is informative: it shows which boundary the learner has not yet represented. Correct the earliest wrong assumption, not merely the final line. Back up, run repair from the relevant location and verify list output.

For a short Punggol home session, use a prediction–observation–explanation cycle. Write the prediction before using the interpreter, browser or terminal. Record the observation exactly. Then write one causal sentence containing “because”. If the sentence only repeats the output, shrink the case until every transition can be named.

Core worked example

git worktree repair ../moved-project-task

Reasoning. Git attempts to restore correct links to the moved worktree. The important check is not whether the final output looks plausible. Identify the input state, the rule applied, the boundary at which the rule takes effect, and the evidence that would expose a different rule. Then change one part of the example and predict again.

Five deliberate variations

Variation 1: project board. First, predict without running anything. Model tasks moving among planned, doing, review and done states. Apply the chapter rule—repair can reconnect worktree administrative data after certain manual repository or linked-directory moves. Before using a tool, state what remains unchanged, what is being varied, and which visible result would disprove the prediction.

Explained answer. Begin from the rule, not from a guessed output. Git attempts to restore correct links to the moved worktree. In the project board setting, inspect the earliest point where editing gitdir files before trying the supported repair command could occur. The safe procedure is: Back up, run repair from the relevant location and verify list output. If the data contains an empty value, a duplicate identity, a nested control, an unexpected ancestor or an unavailable path, pause and decide whether the chapter’s default policy still applies. This makes the exercise a transfer test rather than a cosmetic renaming of variables.

Variation 2: homework tracker. Next, isolate one variable and hold the others constant. Model a short list of assignments with subject, due date and completion state. Apply the chapter rule—repair can reconnect worktree administrative data after certain manual repository or linked-directory moves. Before using a tool, state what remains unchanged, what is being varied, and which visible result would disprove the prediction.

Explained answer. Begin from the rule, not from a guessed output. Git attempts to restore correct links to the moved worktree. In the homework tracker setting, inspect the earliest point where editing gitdir files before trying the supported repair command could occur. The safe procedure is: Back up, run repair from the relevant location and verify list output. If the data contains an empty value, a duplicate identity, a nested control, an unexpected ancestor or an unavailable path, pause and decide whether the chapter’s default policy still applies. This makes the exercise a transfer test rather than a cosmetic renaming of variables.

Variation 3: library search. Now, test a boundary that a comfortable example would hide. Model book records with title, topic, shelf code and availability. Apply the chapter rule—repair can reconnect worktree administrative data after certain manual repository or linked-directory moves. Before using a tool, state what remains unchanged, what is being varied, and which visible result would disprove the prediction.

Explained answer. Begin from the rule, not from a guessed output. Git attempts to restore correct links to the moved worktree. In the library search setting, inspect the earliest point where editing gitdir files before trying the supported repair command could occur. The safe procedure is: Back up, run repair from the relevant location and verify list output. If the data contains an empty value, a duplicate identity, a nested control, an unexpected ancestor or an unavailable path, pause and decide whether the chapter’s default policy still applies. This makes the exercise a transfer test rather than a cosmetic renaming of variables.

Variation 4: CCA sign-up. Then, explain the result to a study partner without using jargon as a substitute for cause. Model activity rows with a name, weekday, capacity and registered pupils. Apply the chapter rule—repair can reconnect worktree administrative data after certain manual repository or linked-directory moves. Before using a tool, state what remains unchanged, what is being varied, and which visible result would disprove the prediction.

Explained answer. Begin from the rule, not from a guessed output. Git attempts to restore correct links to the moved worktree. In the CCA sign-up setting, inspect the earliest point where editing gitdir files before trying the supported repair command could occur. The safe procedure is: Back up, run repair from the relevant location and verify list output. If the data contains an empty value, a duplicate identity, a nested control, an unexpected ancestor or an unavailable path, pause and decide whether the chapter’s default policy still applies. This makes the exercise a transfer test rather than a cosmetic renaming of variables.

Variation 5: revision planner. Finally, transfer the rule to a new setting and state what would invalidate it. Model topics tagged by confidence, next review date and evidence. Apply the chapter rule—repair can reconnect worktree administrative data after certain manual repository or linked-directory moves. Before using a tool, state what remains unchanged, what is being varied, and which visible result would disprove the prediction.

Explained answer. Begin from the rule, not from a guessed output. Git attempts to restore correct links to the moved worktree. In the revision planner setting, inspect the earliest point where editing gitdir files before trying the supported repair command could occur. The safe procedure is: Back up, run repair from the relevant location and verify list output. If the data contains an empty value, a duplicate identity, a nested control, an unexpected ancestor or an unavailable path, pause and decide whether the chapter’s default policy still applies. This makes the exercise a transfer test rather than a cosmetic renaming of variables.

Diagnostic route

  • If the vocabulary is unclear: ask the learner to point to the concrete element represented by each noun in the rule.
  • If the prediction is wrong: find the first state where the written trace differs from the observed trace.
  • If the output is right but the explanation is weak: introduce one near-miss that triggers editing gitdir files before trying the supported repair command.
  • If the example is easy: transfer it to a second context and require the learner to name the invariant.
  • If the tool behaves differently: consult the linked official documentation and record the relevant version or environment.

A parent does not need to supply the technical answer. Ask: “What did you expect?”, “What evidence changed your mind?”, and “What is the smallest example that keeps the problem?” Those questions protect learner ownership while still making an evening practice session structured and calm.

Practice with an explained answer

Question. Design a tiny revision planner example using topics tagged by confidence, next review date and evidence. Make one ordinary case, one boundary case and one case that exposes editing gitdir files before trying the supported repair command. Predict all three, run or inspect them, and state whether the governing idea needs qualification.

Answer guide. A strong response names the chapter rule first: repair can reconnect worktree administrative data after certain manual repository or linked-directory moves. It then shows three separate traces, not just three final outputs. The boundary case must sit exactly on a threshold or ownership edge. The near-miss must demonstrate why editing gitdir files before trying the supported repair command is unsafe. The final explanation should conclude with this operational step: Back up, run repair from the relevant location and verify list output. Different data values are acceptable when the reasoning and evidence remain consistent.

Transfer and decision point

Transfer this chapter to an unfamiliar project by separating mechanism from policy. The mechanism is what the language, browser or Git command does. The policy is what this project intends to preserve. When those are blended, a technically valid operation can still be educationally or operationally wrong. Write both statements, choose a reversible test, and keep important work backed up.

Previous chapter . Contents . Next chapter

CHAPTER 15 OF 20 . Debug and verify

15. Branch deletion decisions

Back to contents

Removing a worktree does not automatically decide whether its branch should be merged, retained or deleted. This is the chapter’s governing idea. A learner should be able to restate it in ordinary language, point to the relevant state in an example, and predict the consequence of one controlled change. Those three actions distinguish a working mental model from a phrase copied from a reference page.

The common trap is deleting a branch merely because the directory is gone. That error is informative: it shows which boundary the learner has not yet represented. Correct the earliest wrong assumption, not merely the final line. Inspect merge status and project policy separately from worktree cleanup.

For a short Punggol home session, use a prediction–observation–explanation cycle. Write the prediction before using the interpreter, browser or terminal. Record the observation exactly. Then write one causal sentence containing “because”. If the sentence only repeats the output, shrink the case until every transition can be named.

Core worked example

git branch --merged main

Reasoning. The output informs but does not replace a deliberate branch decision. The important check is not whether the final output looks plausible. Identify the input state, the rule applied, the boundary at which the rule takes effect, and the evidence that would expose a different rule. Then change one part of the example and predict again.

Five deliberate variations

Variation 1: CCA sign-up. First, predict without running anything. Model activity rows with a name, weekday, capacity and registered pupils. Apply the chapter rule—removing a worktree does not automatically decide whether its branch should be merged, retained or deleted. Before using a tool, state what remains unchanged, what is being varied, and which visible result would disprove the prediction.

Explained answer. Begin from the rule, not from a guessed output. The output informs but does not replace a deliberate branch decision. In the CCA sign-up setting, inspect the earliest point where deleting a branch merely because the directory is gone could occur. The safe procedure is: Inspect merge status and project policy separately from worktree cleanup. If the data contains an empty value, a duplicate identity, a nested control, an unexpected ancestor or an unavailable path, pause and decide whether the chapter’s default policy still applies. This makes the exercise a transfer test rather than a cosmetic renaming of variables.

Variation 2: revision planner. Next, isolate one variable and hold the others constant. Model topics tagged by confidence, next review date and evidence. Apply the chapter rule—removing a worktree does not automatically decide whether its branch should be merged, retained or deleted. Before using a tool, state what remains unchanged, what is being varied, and which visible result would disprove the prediction.

Explained answer. Begin from the rule, not from a guessed output. The output informs but does not replace a deliberate branch decision. In the revision planner setting, inspect the earliest point where deleting a branch merely because the directory is gone could occur. The safe procedure is: Inspect merge status and project policy separately from worktree cleanup. If the data contains an empty value, a duplicate identity, a nested control, an unexpected ancestor or an unavailable path, pause and decide whether the chapter’s default policy still applies. This makes the exercise a transfer test rather than a cosmetic renaming of variables.

Variation 3: canteen budget. Now, test a boundary that a comfortable example would hide. Model items with prices, quantities and a fixed spending limit. Apply the chapter rule—removing a worktree does not automatically decide whether its branch should be merged, retained or deleted. Before using a tool, state what remains unchanged, what is being varied, and which visible result would disprove the prediction.

Explained answer. Begin from the rule, not from a guessed output. The output informs but does not replace a deliberate branch decision. In the canteen budget setting, inspect the earliest point where deleting a branch merely because the directory is gone could occur. The safe procedure is: Inspect merge status and project policy separately from worktree cleanup. If the data contains an empty value, a duplicate identity, a nested control, an unexpected ancestor or an unavailable path, pause and decide whether the chapter’s default policy still applies. This makes the exercise a transfer test rather than a cosmetic renaming of variables.

Variation 4: weather journal. Then, explain the result to a study partner without using jargon as a substitute for cause. Model daily observations with temperature, rain and a written note. Apply the chapter rule—removing a worktree does not automatically decide whether its branch should be merged, retained or deleted. Before using a tool, state what remains unchanged, what is being varied, and which visible result would disprove the prediction.

Explained answer. Begin from the rule, not from a guessed output. The output informs but does not replace a deliberate branch decision. In the weather journal setting, inspect the earliest point where deleting a branch merely because the directory is gone could occur. The safe procedure is: Inspect merge status and project policy separately from worktree cleanup. If the data contains an empty value, a duplicate identity, a nested control, an unexpected ancestor or an unavailable path, pause and decide whether the chapter’s default policy still applies. This makes the exercise a transfer test rather than a cosmetic renaming of variables.

Variation 5: reading log. Finally, transfer the rule to a new setting and state what would invalidate it. Model pages, dates, unfamiliar words and a one-sentence reflection. Apply the chapter rule—removing a worktree does not automatically decide whether its branch should be merged, retained or deleted. Before using a tool, state what remains unchanged, what is being varied, and which visible result would disprove the prediction.

Explained answer. Begin from the rule, not from a guessed output. The output informs but does not replace a deliberate branch decision. In the reading log setting, inspect the earliest point where deleting a branch merely because the directory is gone could occur. The safe procedure is: Inspect merge status and project policy separately from worktree cleanup. If the data contains an empty value, a duplicate identity, a nested control, an unexpected ancestor or an unavailable path, pause and decide whether the chapter’s default policy still applies. This makes the exercise a transfer test rather than a cosmetic renaming of variables.

Diagnostic route

  • If the vocabulary is unclear: ask the learner to point to the concrete element represented by each noun in the rule.
  • If the prediction is wrong: find the first state where the written trace differs from the observed trace.
  • If the output is right but the explanation is weak: introduce one near-miss that triggers deleting a branch merely because the directory is gone.
  • If the example is easy: transfer it to a second context and require the learner to name the invariant.
  • If the tool behaves differently: consult the linked official documentation and record the relevant version or environment.

A parent does not need to supply the technical answer. Ask: “What did you expect?”, “What evidence changed your mind?”, and “What is the smallest example that keeps the problem?” Those questions protect learner ownership while still making an evening practice session structured and calm.

Practice with an explained answer

Question. Design a tiny canteen budget example using items with prices, quantities and a fixed spending limit. Make one ordinary case, one boundary case and one case that exposes deleting a branch merely because the directory is gone. Predict all three, run or inspect them, and state whether the governing idea needs qualification.

Answer guide. A strong response names the chapter rule first: Removing a worktree does not automatically decide whether its branch should be merged, retained or deleted. It then shows three separate traces, not just three final outputs. The boundary case must sit exactly on a threshold or ownership edge. The near-miss must demonstrate why deleting a branch merely because the directory is gone is unsafe. The final explanation should conclude with this operational step: Inspect merge status and project policy separately from worktree cleanup. Different data values are acceptable when the reasoning and evidence remain consistent.

Transfer and decision point

Transfer this chapter to an unfamiliar project by separating mechanism from policy. The mechanism is what the language, browser or Git command does. The policy is what this project intends to preserve. When those are blended, a technically valid operation can still be educationally or operationally wrong. Write both statements, choose a reversible test, and keep important work backed up.

Previous chapter . Contents . Next chapter

CHAPTER 16 OF 20 . Debug and verify

16. Submodules and caveats

Back to contents

Multiple worktrees have documented caveats with submodules and version-specific behaviour. This is the chapter’s governing idea. A learner should be able to restate it in ordinary language, point to the relevant state in an example, and predict the consequence of one controlled change. Those three actions distinguish a working mental model from a phrase copied from a reference page.

The common trap is assuming every repository feature composes perfectly. That error is informative: it shows which boundary the learner has not yet represented. Correct the earliest wrong assumption, not merely the final line. Read the current official manual and test in a disposable clone before adopting the workflow.

For a short Punggol home session, use a prediction–observation–explanation cycle. Write the prediction before using the interpreter, browser or terminal. Record the observation exactly. Then write one causal sentence containing “because”. If the sentence only repeats the output, shrink the case until every transition can be named.

Core worked example

git submodule status

Reasoning. Repository-specific submodule state must be checked explicitly. The important check is not whether the final output looks plausible. Identify the input state, the rule applied, the boundary at which the rule takes effect, and the evidence that would expose a different rule. Then change one part of the example and predict again.

Five deliberate variations

Variation 1: weather journal. First, predict without running anything. Model daily observations with temperature, rain and a written note. Apply the chapter rule—multiple worktrees have documented caveats with submodules and version-specific behaviour. Before using a tool, state what remains unchanged, what is being varied, and which visible result would disprove the prediction.

Explained answer. Begin from the rule, not from a guessed output. Repository-specific submodule state must be checked explicitly. In the weather journal setting, inspect the earliest point where assuming every repository feature composes perfectly could occur. The safe procedure is: Read the current official manual and test in a disposable clone before adopting the workflow. If the data contains an empty value, a duplicate identity, a nested control, an unexpected ancestor or an unavailable path, pause and decide whether the chapter’s default policy still applies. This makes the exercise a transfer test rather than a cosmetic renaming of variables.

Variation 2: reading log. Next, isolate one variable and hold the others constant. Model pages, dates, unfamiliar words and a one-sentence reflection. Apply the chapter rule—multiple worktrees have documented caveats with submodules and version-specific behaviour. Before using a tool, state what remains unchanged, what is being varied, and which visible result would disprove the prediction.

Explained answer. Begin from the rule, not from a guessed output. Repository-specific submodule state must be checked explicitly. In the reading log setting, inspect the earliest point where assuming every repository feature composes perfectly could occur. The safe procedure is: Read the current official manual and test in a disposable clone before adopting the workflow. If the data contains an empty value, a duplicate identity, a nested control, an unexpected ancestor or an unavailable path, pause and decide whether the chapter’s default policy still applies. This makes the exercise a transfer test rather than a cosmetic renaming of variables.

Variation 3: project board. Now, test a boundary that a comfortable example would hide. Model tasks moving among planned, doing, review and done states. Apply the chapter rule—multiple worktrees have documented caveats with submodules and version-specific behaviour. Before using a tool, state what remains unchanged, what is being varied, and which visible result would disprove the prediction.

Explained answer. Begin from the rule, not from a guessed output. Repository-specific submodule state must be checked explicitly. In the project board setting, inspect the earliest point where assuming every repository feature composes perfectly could occur. The safe procedure is: Read the current official manual and test in a disposable clone before adopting the workflow. If the data contains an empty value, a duplicate identity, a nested control, an unexpected ancestor or an unavailable path, pause and decide whether the chapter’s default policy still applies. This makes the exercise a transfer test rather than a cosmetic renaming of variables.

Variation 4: homework tracker. Then, explain the result to a study partner without using jargon as a substitute for cause. Model a short list of assignments with subject, due date and completion state. Apply the chapter rule—multiple worktrees have documented caveats with submodules and version-specific behaviour. Before using a tool, state what remains unchanged, what is being varied, and which visible result would disprove the prediction.

Explained answer. Begin from the rule, not from a guessed output. Repository-specific submodule state must be checked explicitly. In the homework tracker setting, inspect the earliest point where assuming every repository feature composes perfectly could occur. The safe procedure is: Read the current official manual and test in a disposable clone before adopting the workflow. If the data contains an empty value, a duplicate identity, a nested control, an unexpected ancestor or an unavailable path, pause and decide whether the chapter’s default policy still applies. This makes the exercise a transfer test rather than a cosmetic renaming of variables.

Variation 5: library search. Finally, transfer the rule to a new setting and state what would invalidate it. Model book records with title, topic, shelf code and availability. Apply the chapter rule—multiple worktrees have documented caveats with submodules and version-specific behaviour. Before using a tool, state what remains unchanged, what is being varied, and which visible result would disprove the prediction.

Explained answer. Begin from the rule, not from a guessed output. Repository-specific submodule state must be checked explicitly. In the library search setting, inspect the earliest point where assuming every repository feature composes perfectly could occur. The safe procedure is: Read the current official manual and test in a disposable clone before adopting the workflow. If the data contains an empty value, a duplicate identity, a nested control, an unexpected ancestor or an unavailable path, pause and decide whether the chapter’s default policy still applies. This makes the exercise a transfer test rather than a cosmetic renaming of variables.

Diagnostic route

  • If the vocabulary is unclear: ask the learner to point to the concrete element represented by each noun in the rule.
  • If the prediction is wrong: find the first state where the written trace differs from the observed trace.
  • If the output is right but the explanation is weak: introduce one near-miss that triggers assuming every repository feature composes perfectly.
  • If the example is easy: transfer it to a second context and require the learner to name the invariant.
  • If the tool behaves differently: consult the linked official documentation and record the relevant version or environment.

A parent does not need to supply the technical answer. Ask: “What did you expect?”, “What evidence changed your mind?”, and “What is the smallest example that keeps the problem?” Those questions protect learner ownership while still making an evening practice session structured and calm.

Practice with an explained answer

Question. Design a tiny weather journal example using daily observations with temperature, rain and a written note. Make one ordinary case, one boundary case and one case that exposes assuming every repository feature composes perfectly. Predict all three, run or inspect them, and state whether the governing idea needs qualification.

Answer guide. A strong response names the chapter rule first: Multiple worktrees have documented caveats with submodules and version-specific behaviour. It then shows three separate traces, not just three final outputs. The boundary case must sit exactly on a threshold or ownership edge. The near-miss must demonstrate why assuming every repository feature composes perfectly is unsafe. The final explanation should conclude with this operational step: Read the current official manual and test in a disposable clone before adopting the workflow. Different data values are acceptable when the reasoning and evidence remain consistent.

Transfer and decision point

Transfer this chapter to an unfamiliar project by separating mechanism from policy. The mechanism is what the language, browser or Git command does. The policy is what this project intends to preserve. When those are blended, a technically valid operation can still be educationally or operationally wrong. Write both statements, choose a reversible test, and keep important work backed up.

Previous chapter . Contents . Next chapter

CHAPTER 17 OF 20 . Transfer with judgment

17. Dependencies and generated files

Back to contents

Each worktree has separate files, so dependencies, build outputs and environment configuration may need separate setup or carefully designed sharing. This is the chapter’s governing idea. A learner should be able to restate it in ordinary language, point to the relevant state in an example, and predict the consequence of one controlled change. Those three actions distinguish a working mental model from a phrase copied from a reference page.

The common trap is sharing mutable build directories that contaminate results. That error is informative: it shows which boundary the learner has not yet represented. Correct the earliest wrong assumption, not merely the final line. Document per-worktree setup and keep secrets outside committed files.

For a short Punggol home session, use a prediction–observation–explanation cycle. Write the prediction before using the interpreter, browser or terminal. Record the observation exactly. Then write one causal sentence containing “because”. If the sentence only repeats the output, shrink the case until every transition can be named.

Core worked example

npm ci

Reasoning. A clean install can make the linked tree reproducible at the cost of disk space. The important check is not whether the final output looks plausible. Identify the input state, the rule applied, the boundary at which the rule takes effect, and the evidence that would expose a different rule. Then change one part of the example and predict again.

Five deliberate variations

Variation 1: homework tracker. First, predict without running anything. Model a short list of assignments with subject, due date and completion state. Apply the chapter rule—each worktree has separate files, so dependencies, build outputs and environment configuration may need separate setup or carefully designed sharing. Before using a tool, state what remains unchanged, what is being varied, and which visible result would disprove the prediction.

Explained answer. Begin from the rule, not from a guessed output. A clean install can make the linked tree reproducible at the cost of disk space. In the homework tracker setting, inspect the earliest point where sharing mutable build directories that contaminate results could occur. The safe procedure is: Document per-worktree setup and keep secrets outside committed files. If the data contains an empty value, a duplicate identity, a nested control, an unexpected ancestor or an unavailable path, pause and decide whether the chapter’s default policy still applies. This makes the exercise a transfer test rather than a cosmetic renaming of variables.

Variation 2: library search. Next, isolate one variable and hold the others constant. Model book records with title, topic, shelf code and availability. Apply the chapter rule—each worktree has separate files, so dependencies, build outputs and environment configuration may need separate setup or carefully designed sharing. Before using a tool, state what remains unchanged, what is being varied, and which visible result would disprove the prediction.

Explained answer. Begin from the rule, not from a guessed output. A clean install can make the linked tree reproducible at the cost of disk space. In the library search setting, inspect the earliest point where sharing mutable build directories that contaminate results could occur. The safe procedure is: Document per-worktree setup and keep secrets outside committed files. If the data contains an empty value, a duplicate identity, a nested control, an unexpected ancestor or an unavailable path, pause and decide whether the chapter’s default policy still applies. This makes the exercise a transfer test rather than a cosmetic renaming of variables.

Variation 3: CCA sign-up. Now, test a boundary that a comfortable example would hide. Model activity rows with a name, weekday, capacity and registered pupils. Apply the chapter rule—each worktree has separate files, so dependencies, build outputs and environment configuration may need separate setup or carefully designed sharing. Before using a tool, state what remains unchanged, what is being varied, and which visible result would disprove the prediction.

Explained answer. Begin from the rule, not from a guessed output. A clean install can make the linked tree reproducible at the cost of disk space. In the CCA sign-up setting, inspect the earliest point where sharing mutable build directories that contaminate results could occur. The safe procedure is: Document per-worktree setup and keep secrets outside committed files. If the data contains an empty value, a duplicate identity, a nested control, an unexpected ancestor or an unavailable path, pause and decide whether the chapter’s default policy still applies. This makes the exercise a transfer test rather than a cosmetic renaming of variables.

Variation 4: revision planner. Then, explain the result to a study partner without using jargon as a substitute for cause. Model topics tagged by confidence, next review date and evidence. Apply the chapter rule—each worktree has separate files, so dependencies, build outputs and environment configuration may need separate setup or carefully designed sharing. Before using a tool, state what remains unchanged, what is being varied, and which visible result would disprove the prediction.

Explained answer. Begin from the rule, not from a guessed output. A clean install can make the linked tree reproducible at the cost of disk space. In the revision planner setting, inspect the earliest point where sharing mutable build directories that contaminate results could occur. The safe procedure is: Document per-worktree setup and keep secrets outside committed files. If the data contains an empty value, a duplicate identity, a nested control, an unexpected ancestor or an unavailable path, pause and decide whether the chapter’s default policy still applies. This makes the exercise a transfer test rather than a cosmetic renaming of variables.

Variation 5: canteen budget. Finally, transfer the rule to a new setting and state what would invalidate it. Model items with prices, quantities and a fixed spending limit. Apply the chapter rule—each worktree has separate files, so dependencies, build outputs and environment configuration may need separate setup or carefully designed sharing. Before using a tool, state what remains unchanged, what is being varied, and which visible result would disprove the prediction.

Explained answer. Begin from the rule, not from a guessed output. A clean install can make the linked tree reproducible at the cost of disk space. In the canteen budget setting, inspect the earliest point where sharing mutable build directories that contaminate results could occur. The safe procedure is: Document per-worktree setup and keep secrets outside committed files. If the data contains an empty value, a duplicate identity, a nested control, an unexpected ancestor or an unavailable path, pause and decide whether the chapter’s default policy still applies. This makes the exercise a transfer test rather than a cosmetic renaming of variables.

Diagnostic route

  • If the vocabulary is unclear: ask the learner to point to the concrete element represented by each noun in the rule.
  • If the prediction is wrong: find the first state where the written trace differs from the observed trace.
  • If the output is right but the explanation is weak: introduce one near-miss that triggers sharing mutable build directories that contaminate results.
  • If the example is easy: transfer it to a second context and require the learner to name the invariant.
  • If the tool behaves differently: consult the linked official documentation and record the relevant version or environment.

A parent does not need to supply the technical answer. Ask: “What did you expect?”, “What evidence changed your mind?”, and “What is the smallest example that keeps the problem?” Those questions protect learner ownership while still making an evening practice session structured and calm.

Practice with an explained answer

Question. Design a tiny reading log example using pages, dates, unfamiliar words and a one-sentence reflection. Make one ordinary case, one boundary case and one case that exposes sharing mutable build directories that contaminate results. Predict all three, run or inspect them, and state whether the governing idea needs qualification.

Answer guide. A strong response names the chapter rule first: Each worktree has separate files, so dependencies, build outputs and environment configuration may need separate setup or carefully designed sharing. It then shows three separate traces, not just three final outputs. The boundary case must sit exactly on a threshold or ownership edge. The near-miss must demonstrate why sharing mutable build directories that contaminate results is unsafe. The final explanation should conclude with this operational step: Document per-worktree setup and keep secrets outside committed files. Different data values are acceptable when the reasoning and evidence remain consistent.

Transfer and decision point

Transfer this chapter to an unfamiliar project by separating mechanism from policy. The mechanism is what the language, browser or Git command does. The policy is what this project intends to preserve. When those are blended, a technically valid operation can still be educationally or operationally wrong. Write both statements, choose a reversible test, and keep important work backed up.

Previous chapter . Contents . Next chapter

CHAPTER 18 OF 20 . Transfer with judgment

18. Hotfix workflow

Back to contents

A linked worktree can isolate an urgent fix while feature edits remain untouched in the main worktree. This is the chapter’s governing idea. A learner should be able to restate it in ordinary language, point to the relevant state in an example, and predict the consequence of one controlled change. Those three actions distinguish a working mental model from a phrase copied from a reference page.

The common trap is switching branches in the dirty main tree under pressure. That error is informative: it shows which boundary the learner has not yet represented. Correct the earliest wrong assumption, not merely the final line. Create from the production base, test, commit, merge through normal review and then remove.

For a short Punggol home session, use a prediction–observation–explanation cycle. Write the prediction before using the interpreter, browser or terminal. Record the observation exactly. Then write one causal sentence containing “because”. If the sentence only repeats the output, shrink the case until every transition can be named.

Core worked example

git worktree add -b hotfix/session ../project-hotfix origin/main

Reasoning. The urgent branch begins from the declared remote-tracking base. The important check is not whether the final output looks plausible. Identify the input state, the rule applied, the boundary at which the rule takes effect, and the evidence that would expose a different rule. Then change one part of the example and predict again.

Five deliberate variations

Variation 1: revision planner. First, predict without running anything. Model topics tagged by confidence, next review date and evidence. Apply the chapter rule—a linked worktree can isolate an urgent fix while feature edits remain untouched in the main worktree. Before using a tool, state what remains unchanged, what is being varied, and which visible result would disprove the prediction.

Explained answer. Begin from the rule, not from a guessed output. The urgent branch begins from the declared remote-tracking base. In the revision planner setting, inspect the earliest point where switching branches in the dirty main tree under pressure could occur. The safe procedure is: Create from the production base, test, commit, merge through normal review and then remove. If the data contains an empty value, a duplicate identity, a nested control, an unexpected ancestor or an unavailable path, pause and decide whether the chapter’s default policy still applies. This makes the exercise a transfer test rather than a cosmetic renaming of variables.

Variation 2: canteen budget. Next, isolate one variable and hold the others constant. Model items with prices, quantities and a fixed spending limit. Apply the chapter rule—a linked worktree can isolate an urgent fix while feature edits remain untouched in the main worktree. Before using a tool, state what remains unchanged, what is being varied, and which visible result would disprove the prediction.

Explained answer. Begin from the rule, not from a guessed output. The urgent branch begins from the declared remote-tracking base. In the canteen budget setting, inspect the earliest point where switching branches in the dirty main tree under pressure could occur. The safe procedure is: Create from the production base, test, commit, merge through normal review and then remove. If the data contains an empty value, a duplicate identity, a nested control, an unexpected ancestor or an unavailable path, pause and decide whether the chapter’s default policy still applies. This makes the exercise a transfer test rather than a cosmetic renaming of variables.

Variation 3: weather journal. Now, test a boundary that a comfortable example would hide. Model daily observations with temperature, rain and a written note. Apply the chapter rule—a linked worktree can isolate an urgent fix while feature edits remain untouched in the main worktree. Before using a tool, state what remains unchanged, what is being varied, and which visible result would disprove the prediction.

Explained answer. Begin from the rule, not from a guessed output. The urgent branch begins from the declared remote-tracking base. In the weather journal setting, inspect the earliest point where switching branches in the dirty main tree under pressure could occur. The safe procedure is: Create from the production base, test, commit, merge through normal review and then remove. If the data contains an empty value, a duplicate identity, a nested control, an unexpected ancestor or an unavailable path, pause and decide whether the chapter’s default policy still applies. This makes the exercise a transfer test rather than a cosmetic renaming of variables.

Variation 4: reading log. Then, explain the result to a study partner without using jargon as a substitute for cause. Model pages, dates, unfamiliar words and a one-sentence reflection. Apply the chapter rule—a linked worktree can isolate an urgent fix while feature edits remain untouched in the main worktree. Before using a tool, state what remains unchanged, what is being varied, and which visible result would disprove the prediction.

Explained answer. Begin from the rule, not from a guessed output. The urgent branch begins from the declared remote-tracking base. In the reading log setting, inspect the earliest point where switching branches in the dirty main tree under pressure could occur. The safe procedure is: Create from the production base, test, commit, merge through normal review and then remove. If the data contains an empty value, a duplicate identity, a nested control, an unexpected ancestor or an unavailable path, pause and decide whether the chapter’s default policy still applies. This makes the exercise a transfer test rather than a cosmetic renaming of variables.

Variation 5: project board. Finally, transfer the rule to a new setting and state what would invalidate it. Model tasks moving among planned, doing, review and done states. Apply the chapter rule—a linked worktree can isolate an urgent fix while feature edits remain untouched in the main worktree. Before using a tool, state what remains unchanged, what is being varied, and which visible result would disprove the prediction.

Explained answer. Begin from the rule, not from a guessed output. The urgent branch begins from the declared remote-tracking base. In the project board setting, inspect the earliest point where switching branches in the dirty main tree under pressure could occur. The safe procedure is: Create from the production base, test, commit, merge through normal review and then remove. If the data contains an empty value, a duplicate identity, a nested control, an unexpected ancestor or an unavailable path, pause and decide whether the chapter’s default policy still applies. This makes the exercise a transfer test rather than a cosmetic renaming of variables.

Diagnostic route

  • If the vocabulary is unclear: ask the learner to point to the concrete element represented by each noun in the rule.
  • If the prediction is wrong: find the first state where the written trace differs from the observed trace.
  • If the output is right but the explanation is weak: introduce one near-miss that triggers switching branches in the dirty main tree under pressure.
  • If the example is easy: transfer it to a second context and require the learner to name the invariant.
  • If the tool behaves differently: consult the linked official documentation and record the relevant version or environment.

A parent does not need to supply the technical answer. Ask: “What did you expect?”, “What evidence changed your mind?”, and “What is the smallest example that keeps the problem?” Those questions protect learner ownership while still making an evening practice session structured and calm.

Practice with an explained answer

Question. Design a tiny project board example using tasks moving among planned, doing, review and done states. Make one ordinary case, one boundary case and one case that exposes switching branches in the dirty main tree under pressure. Predict all three, run or inspect them, and state whether the governing idea needs qualification.

Answer guide. A strong response names the chapter rule first: A linked worktree can isolate an urgent fix while feature edits remain untouched in the main worktree. It then shows three separate traces, not just three final outputs. The boundary case must sit exactly on a threshold or ownership edge. The near-miss must demonstrate why switching branches in the dirty main tree under pressure is unsafe. The final explanation should conclude with this operational step: Create from the production base, test, commit, merge through normal review and then remove. Different data values are acceptable when the reasoning and evidence remain consistent.

Transfer and decision point

Transfer this chapter to an unfamiliar project by separating mechanism from policy. The mechanism is what the language, browser or Git command does. The policy is what this project intends to preserve. When those are blended, a technically valid operation can still be educationally or operationally wrong. Write both statements, choose a reversible test, and keep important work backed up.

Previous chapter . Contents . Next chapter

CHAPTER 19 OF 20 . Transfer with judgment

19. Parallel reviews and tests

Back to contents

Separate worktrees can hold review branches or test matrices simultaneously, but shared repository operations still require coordination. This is the chapter’s governing idea. A learner should be able to restate it in ordinary language, point to the relevant state in an example, and predict the consequence of one controlled change. Those three actions distinguish a working mental model from a phrase copied from a reference page.

The common trap is running scripts that assume one fixed repository path. That error is informative: it shows which boundary the learner has not yet represented. Correct the earliest wrong assumption, not merely the final line. Parameterise paths and label terminals clearly.

For a short Punggol home session, use a prediction–observation–explanation cycle. Write the prediction before using the interpreter, browser or terminal. Record the observation exactly. Then write one causal sentence containing “because”. If the sentence only repeats the output, shrink the case until every transition can be named.

Core worked example

git -C ../project-review log -1 --oneline

Reasoning. The -C option targets the intended worktree without changing the shell directory. The important check is not whether the final output looks plausible. Identify the input state, the rule applied, the boundary at which the rule takes effect, and the evidence that would expose a different rule. Then change one part of the example and predict again.

Five deliberate variations

Variation 1: reading log. First, predict without running anything. Model pages, dates, unfamiliar words and a one-sentence reflection. Apply the chapter rule—separate worktrees can hold review branches or test matrices simultaneously, but shared repository operations still require coordination. Before using a tool, state what remains unchanged, what is being varied, and which visible result would disprove the prediction.

Explained answer. Begin from the rule, not from a guessed output. The -C option targets the intended worktree without changing the shell directory. In the reading log setting, inspect the earliest point where running scripts that assume one fixed repository path could occur. The safe procedure is: Parameterise paths and label terminals clearly. If the data contains an empty value, a duplicate identity, a nested control, an unexpected ancestor or an unavailable path, pause and decide whether the chapter’s default policy still applies. This makes the exercise a transfer test rather than a cosmetic renaming of variables.

Variation 2: project board. Next, isolate one variable and hold the others constant. Model tasks moving among planned, doing, review and done states. Apply the chapter rule—separate worktrees can hold review branches or test matrices simultaneously, but shared repository operations still require coordination. Before using a tool, state what remains unchanged, what is being varied, and which visible result would disprove the prediction.

Explained answer. Begin from the rule, not from a guessed output. The -C option targets the intended worktree without changing the shell directory. In the project board setting, inspect the earliest point where running scripts that assume one fixed repository path could occur. The safe procedure is: Parameterise paths and label terminals clearly. If the data contains an empty value, a duplicate identity, a nested control, an unexpected ancestor or an unavailable path, pause and decide whether the chapter’s default policy still applies. This makes the exercise a transfer test rather than a cosmetic renaming of variables.

Variation 3: homework tracker. Now, test a boundary that a comfortable example would hide. Model a short list of assignments with subject, due date and completion state. Apply the chapter rule—separate worktrees can hold review branches or test matrices simultaneously, but shared repository operations still require coordination. Before using a tool, state what remains unchanged, what is being varied, and which visible result would disprove the prediction.

Explained answer. Begin from the rule, not from a guessed output. The -C option targets the intended worktree without changing the shell directory. In the homework tracker setting, inspect the earliest point where running scripts that assume one fixed repository path could occur. The safe procedure is: Parameterise paths and label terminals clearly. If the data contains an empty value, a duplicate identity, a nested control, an unexpected ancestor or an unavailable path, pause and decide whether the chapter’s default policy still applies. This makes the exercise a transfer test rather than a cosmetic renaming of variables.

Variation 4: library search. Then, explain the result to a study partner without using jargon as a substitute for cause. Model book records with title, topic, shelf code and availability. Apply the chapter rule—separate worktrees can hold review branches or test matrices simultaneously, but shared repository operations still require coordination. Before using a tool, state what remains unchanged, what is being varied, and which visible result would disprove the prediction.

Explained answer. Begin from the rule, not from a guessed output. The -C option targets the intended worktree without changing the shell directory. In the library search setting, inspect the earliest point where running scripts that assume one fixed repository path could occur. The safe procedure is: Parameterise paths and label terminals clearly. If the data contains an empty value, a duplicate identity, a nested control, an unexpected ancestor or an unavailable path, pause and decide whether the chapter’s default policy still applies. This makes the exercise a transfer test rather than a cosmetic renaming of variables.

Variation 5: CCA sign-up. Finally, transfer the rule to a new setting and state what would invalidate it. Model activity rows with a name, weekday, capacity and registered pupils. Apply the chapter rule—separate worktrees can hold review branches or test matrices simultaneously, but shared repository operations still require coordination. Before using a tool, state what remains unchanged, what is being varied, and which visible result would disprove the prediction.

Explained answer. Begin from the rule, not from a guessed output. The -C option targets the intended worktree without changing the shell directory. In the CCA sign-up setting, inspect the earliest point where running scripts that assume one fixed repository path could occur. The safe procedure is: Parameterise paths and label terminals clearly. If the data contains an empty value, a duplicate identity, a nested control, an unexpected ancestor or an unavailable path, pause and decide whether the chapter’s default policy still applies. This makes the exercise a transfer test rather than a cosmetic renaming of variables.

Diagnostic route

  • If the vocabulary is unclear: ask the learner to point to the concrete element represented by each noun in the rule.
  • If the prediction is wrong: find the first state where the written trace differs from the observed trace.
  • If the output is right but the explanation is weak: introduce one near-miss that triggers running scripts that assume one fixed repository path.
  • If the example is easy: transfer it to a second context and require the learner to name the invariant.
  • If the tool behaves differently: consult the linked official documentation and record the relevant version or environment.

A parent does not need to supply the technical answer. Ask: “What did you expect?”, “What evidence changed your mind?”, and “What is the smallest example that keeps the problem?” Those questions protect learner ownership while still making an evening practice session structured and calm.

Practice with an explained answer

Question. Design a tiny homework tracker example using a short list of assignments with subject, due date and completion state. Make one ordinary case, one boundary case and one case that exposes running scripts that assume one fixed repository path. Predict all three, run or inspect them, and state whether the governing idea needs qualification.

Answer guide. A strong response names the chapter rule first: Separate worktrees can hold review branches or test matrices simultaneously, but shared repository operations still require coordination. It then shows three separate traces, not just three final outputs. The boundary case must sit exactly on a threshold or ownership edge. The near-miss must demonstrate why running scripts that assume one fixed repository path is unsafe. The final explanation should conclude with this operational step: Parameterise paths and label terminals clearly. Different data values are acceptable when the reasoning and evidence remain consistent.

Transfer and decision point

Transfer this chapter to an unfamiliar project by separating mechanism from policy. The mechanism is what the language, browser or Git command does. The policy is what this project intends to preserve. When those are blended, a technically valid operation can still be educationally or operationally wrong. Write both statements, choose a reversible test, and keep important work backed up.

Previous chapter . Contents . Next chapter

CHAPTER 20 OF 20 . Transfer with judgment

20. Mastery and recovery

Back to contents

Mastery means predicting shared versus local consequences, preserving uncommitted work and using list output as the source of truth. This is the chapter’s governing idea. A learner should be able to restate it in ordinary language, point to the relevant state in an example, and predict the consequence of one controlled change. Those three actions distinguish a working mental model from a phrase copied from a reference page.

The common trap is memorising subcommands without rehearsing failure recovery. That error is informative: it shows which boundary the learner has not yet represented. Correct the earliest wrong assumption, not merely the final line. Build and dismantle a disposable three-worktree repository, including one move and one prune simulation.

For a short Punggol home session, use a prediction–observation–explanation cycle. Write the prediction before using the interpreter, browser or terminal. Record the observation exactly. Then write one causal sentence containing “because”. If the sentence only repeats the output, shrink the case until every transition can be named.

Core worked example

git worktree list --porcelain

Reasoning. A final clean listing proves which worktrees and branches remain. The important check is not whether the final output looks plausible. Identify the input state, the rule applied, the boundary at which the rule takes effect, and the evidence that would expose a different rule. Then change one part of the example and predict again.

Five deliberate variations

Variation 1: library search. First, predict without running anything. Model book records with title, topic, shelf code and availability. Apply the chapter rule—mastery means predicting shared versus local consequences, preserving uncommitted work and using list output as the source of truth. Before using a tool, state what remains unchanged, what is being varied, and which visible result would disprove the prediction.

Explained answer. Begin from the rule, not from a guessed output. A final clean listing proves which worktrees and branches remain. In the library search setting, inspect the earliest point where memorising subcommands without rehearsing failure recovery could occur. The safe procedure is: Build and dismantle a disposable three-worktree repository, including one move and one prune simulation. If the data contains an empty value, a duplicate identity, a nested control, an unexpected ancestor or an unavailable path, pause and decide whether the chapter’s default policy still applies. This makes the exercise a transfer test rather than a cosmetic renaming of variables.

Variation 2: CCA sign-up. Next, isolate one variable and hold the others constant. Model activity rows with a name, weekday, capacity and registered pupils. Apply the chapter rule—mastery means predicting shared versus local consequences, preserving uncommitted work and using list output as the source of truth. Before using a tool, state what remains unchanged, what is being varied, and which visible result would disprove the prediction.

Explained answer. Begin from the rule, not from a guessed output. A final clean listing proves which worktrees and branches remain. In the CCA sign-up setting, inspect the earliest point where memorising subcommands without rehearsing failure recovery could occur. The safe procedure is: Build and dismantle a disposable three-worktree repository, including one move and one prune simulation. If the data contains an empty value, a duplicate identity, a nested control, an unexpected ancestor or an unavailable path, pause and decide whether the chapter’s default policy still applies. This makes the exercise a transfer test rather than a cosmetic renaming of variables.

Variation 3: revision planner. Now, test a boundary that a comfortable example would hide. Model topics tagged by confidence, next review date and evidence. Apply the chapter rule—mastery means predicting shared versus local consequences, preserving uncommitted work and using list output as the source of truth. Before using a tool, state what remains unchanged, what is being varied, and which visible result would disprove the prediction.

Explained answer. Begin from the rule, not from a guessed output. A final clean listing proves which worktrees and branches remain. In the revision planner setting, inspect the earliest point where memorising subcommands without rehearsing failure recovery could occur. The safe procedure is: Build and dismantle a disposable three-worktree repository, including one move and one prune simulation. If the data contains an empty value, a duplicate identity, a nested control, an unexpected ancestor or an unavailable path, pause and decide whether the chapter’s default policy still applies. This makes the exercise a transfer test rather than a cosmetic renaming of variables.

Variation 4: canteen budget. Then, explain the result to a study partner without using jargon as a substitute for cause. Model items with prices, quantities and a fixed spending limit. Apply the chapter rule—mastery means predicting shared versus local consequences, preserving uncommitted work and using list output as the source of truth. Before using a tool, state what remains unchanged, what is being varied, and which visible result would disprove the prediction.

Explained answer. Begin from the rule, not from a guessed output. A final clean listing proves which worktrees and branches remain. In the canteen budget setting, inspect the earliest point where memorising subcommands without rehearsing failure recovery could occur. The safe procedure is: Build and dismantle a disposable three-worktree repository, including one move and one prune simulation. If the data contains an empty value, a duplicate identity, a nested control, an unexpected ancestor or an unavailable path, pause and decide whether the chapter’s default policy still applies. This makes the exercise a transfer test rather than a cosmetic renaming of variables.

Variation 5: weather journal. Finally, transfer the rule to a new setting and state what would invalidate it. Model daily observations with temperature, rain and a written note. Apply the chapter rule—mastery means predicting shared versus local consequences, preserving uncommitted work and using list output as the source of truth. Before using a tool, state what remains unchanged, what is being varied, and which visible result would disprove the prediction.

Explained answer. Begin from the rule, not from a guessed output. A final clean listing proves which worktrees and branches remain. In the weather journal setting, inspect the earliest point where memorising subcommands without rehearsing failure recovery could occur. The safe procedure is: Build and dismantle a disposable three-worktree repository, including one move and one prune simulation. If the data contains an empty value, a duplicate identity, a nested control, an unexpected ancestor or an unavailable path, pause and decide whether the chapter’s default policy still applies. This makes the exercise a transfer test rather than a cosmetic renaming of variables.

Diagnostic route

  • If the vocabulary is unclear: ask the learner to point to the concrete element represented by each noun in the rule.
  • If the prediction is wrong: find the first state where the written trace differs from the observed trace.
  • If the output is right but the explanation is weak: introduce one near-miss that triggers memorising subcommands without rehearsing failure recovery.
  • If the example is easy: transfer it to a second context and require the learner to name the invariant.
  • If the tool behaves differently: consult the linked official documentation and record the relevant version or environment.

A parent does not need to supply the technical answer. Ask: “What did you expect?”, “What evidence changed your mind?”, and “What is the smallest example that keeps the problem?” Those questions protect learner ownership while still making an evening practice session structured and calm.

Practice with an explained answer

Question. Design a tiny library search example using book records with title, topic, shelf code and availability. Make one ordinary case, one boundary case and one case that exposes memorising subcommands without rehearsing failure recovery. Predict all three, run or inspect them, and state whether the governing idea needs qualification.

Answer guide. A strong response names the chapter rule first: Mastery means predicting shared versus local consequences, preserving uncommitted work and using list output as the source of truth. It then shows three separate traces, not just three final outputs. The boundary case must sit exactly on a threshold or ownership edge. The near-miss must demonstrate why memorising subcommands without rehearsing failure recovery is unsafe. The final explanation should conclude with this operational step: Build and dismantle a disposable three-worktree repository, including one move and one prune simulation. Different data values are acceptable when the reasoning and evidence remain consistent.

Transfer and decision point

Transfer this chapter to an unfamiliar project by separating mechanism from policy. The mechanism is what the language, browser or Git command does. The policy is what this project intends to preserve. When those are blended, a technically valid operation can still be educationally or operationally wrong. Write both statements, choose a reversible test, and keep important work backed up.

Previous chapter . Contents . Next chapter

Parent guide: deciding the next useful step

Start with evidence, not labels such as careless or weak. Ask the learner to predict one small case, then compare the prediction with the observed trace. A mismatch at the first step suggests the mental model needs rebuilding. A correct model with syntax errors calls for focused reference use. Correct routine cases but weak boundary cases call for deliberate variation. Correct explanations across new contexts indicate readiness for a project.

A useful weekly record has four short fields: concept attempted, prediction, observed difference and next test. It should not become a surveillance log. Its purpose is to make progress visible and help the learner choose the next task. Stop a session when fatigue replaces reasoning; return with a smaller case rather than adding pressure.

Seek specialised help when a learner repeatedly cannot connect cause and effect despite smaller examples, when accessibility or safety implications are unclear, or when important repository or project data may be at risk. The right help should make thinking more visible and independent, not create dependence on a hidden answer.

Capstone practice with explained routes

1. homework tracker: plan, predict and verify

Build a small homework tracker using a short list of assignments with subject, due date and completion state. Apply “The repository and worktree model” and one later chapter of your choice. Include an ordinary case, a boundary, a deliberate failure and a recovery. Before using a tool, write the expected state after each important step.

Explained route. Begin with this rule: A main worktree and linked worktrees share most repository data while each has its own checked-out files, index and HEAD. Use the procedure “Label shared objects and refs separately from per-worktree HEAD, index and files.” for the first pass. Then choose a second chapter whose boundary could change the decision. A complete answer contains the initial model, a trace, observed evidence, a correction if necessary, and one sentence explaining how the result would change in a different environment. The precise data may vary; the causal chain must be checkable.

2. library search: plan, predict and verify

Build a small library search using book records with title, topic, shelf code and availability. Apply “Adding an existing branch” and one later chapter of your choice. Include an ordinary case, a boundary, a deliberate failure and a recovery. Before using a tool, write the expected state after each important step.

Explained route. Begin with this rule: An existing branch can be checked out only when Git’s branch-occupancy rules permit it. Use the procedure “Run worktree list and choose a distinct branch or detached state.” for the first pass. Then choose a second chapter whose boundary could change the decision. A complete answer contains the initial model, a trace, observed evidence, a correction if necessary, and one sentence explaining how the result would change in a different environment. The precise data may vary; the causal chain must be checkable.

3. CCA sign-up: plan, predict and verify

Build a small CCA sign-up using activity rows with a name, weekday, capacity and registered pupils. Apply “Reading list output” and one later chapter of your choice. Include an ordinary case, a boundary, a deliberate failure and a recovery. Before using a tool, write the expected state after each important step.

Explained route. Begin with this rule: The human and porcelain formats reveal path, HEAD commit, branch, detached state and lock or prune information. Use the procedure “Verify path, commit and branch before any remove or repair operation.” for the first pass. Then choose a second chapter whose boundary could change the decision. A complete answer contains the initial model, a trace, observed evidence, a correction if necessary, and one sentence explaining how the result would change in a different environment. The precise data may vary; the causal chain must be checkable.

4. revision planner: plan, predict and verify

Build a small revision planner using topics tagged by confidence, next review date and evidence. Apply “Uncommitted changes and force” and one later chapter of your choice. Include an ordinary case, a boundary, a deliberate failure and a recovery. Before using a tool, write the expected state after each important step.

Explained route. Begin with this rule: A modified worktree resists removal to protect work; forcing can destroy uncommitted files. Use the procedure “Inspect status, commit, stash, copy or discard by an explicit decision.” for the first pass. Then choose a second chapter whose boundary could change the decision. A complete answer contains the initial model, a trace, observed evidence, a correction if necessary, and one sentence explaining how the result would change in a different environment. The precise data may vary; the causal chain must be checkable.

5. canteen budget: plan, predict and verify

Build a small canteen budget using items with prices, quantities and a fixed spending limit. Apply “Moving a worktree” and one later chapter of your choice. Include an ordinary case, a boundary, a deliberate failure and a recovery. Before using a tool, write the expected state after each important step.

Explained route. Begin with this rule: move relocates a linked worktree while keeping Git’s records consistent, subject to documented limitations. Use the procedure “Use git worktree move and verify from both old and new paths.” for the first pass. Then choose a second chapter whose boundary could change the decision. A complete answer contains the initial model, a trace, observed evidence, a correction if necessary, and one sentence explaining how the result would change in a different environment. The precise data may vary; the causal chain must be checkable.

6. weather journal: plan, predict and verify

Build a small weather journal using daily observations with temperature, rain and a written note. Apply “Submodules and caveats” and one later chapter of your choice. Include an ordinary case, a boundary, a deliberate failure and a recovery. Before using a tool, write the expected state after each important step.

Explained route. Begin with this rule: Multiple worktrees have documented caveats with submodules and version-specific behaviour. Use the procedure “Read the current official manual and test in a disposable clone before adopting the workflow.” for the first pass. Then choose a second chapter whose boundary could change the decision. A complete answer contains the initial model, a trace, observed evidence, a correction if necessary, and one sentence explaining how the result would change in a different environment. The precise data may vary; the causal chain must be checkable.

7. reading log: plan, predict and verify

Build a small reading log using pages, dates, unfamiliar words and a one-sentence reflection. Apply “Parallel reviews and tests” and one later chapter of your choice. Include an ordinary case, a boundary, a deliberate failure and a recovery. Before using a tool, write the expected state after each important step.

Explained route. Begin with this rule: Separate worktrees can hold review branches or test matrices simultaneously, but shared repository operations still require coordination. Use the procedure “Parameterise paths and label terminals clearly.” for the first pass. Then choose a second chapter whose boundary could change the decision. A complete answer contains the initial model, a trace, observed evidence, a correction if necessary, and one sentence explaining how the result would change in a different environment. The precise data may vary; the causal chain must be checkable.

8. project board: plan, predict and verify

Build a small project board using tasks moving among planned, doing, review and done states. Apply “When a worktree is the right tool” and one later chapter of your choice. Include an ordinary case, a boundary, a deliberate failure and a recovery. Before using a tool, write the expected state after each important step.

Explained route. Begin with this rule: Worktrees suit concurrent tasks that need separate files, such as a hotfix beside unfinished feature work. Use the procedure “Name the competing tasks and prove simultaneous checkouts add value.” for the first pass. Then choose a second chapter whose boundary could change the decision. A complete answer contains the initial model, a trace, observed evidence, a correction if necessary, and one sentence explaining how the result would change in a different environment. The precise data may vary; the causal chain must be checkable.

Frequently asked questions

How long should one practice session be?

Long enough to complete one prediction–observation–explanation cycle while attention remains good. Ten to twenty focused minutes can be productive; stop before the work becomes mechanical.

Should a learner memorise every rule first?

No. Keep a small set of governing ideas available, then practise retrieving and applying them. Reference use is part of real technical work, but the learner must still explain the result.

What if the example works but the learner cannot explain it?

Treat that as an incomplete success. Ask for a trace, change one boundary and compare. Reliable understanding survives a controlled variation.

Is the shortest solution the best solution?

Not automatically. Prefer the solution whose policy, failure modes and maintenance cost are easiest to justify for the actual reader and project.

When should official documentation be used?

Use it when syntax, event behaviour, CSS triggers, Git options or version details matter. Tutorials can orient; the primary reference settles the contract.

How can a parent help without knowing the subject?

Ask evidence questions: What did you predict? Which step differed? What is the smallest reproduction? What will you test next?

How do we know the skill transfers?

Give a new context with different names and one unfamiliar boundary. Ask the learner to identify the invariant before writing code or running a command.

What should be saved from the lesson?

Save a brief trace, the corrected rule, one boundary example and a next-step question. Avoid keeping pages of copied output with no explanation.

Can this guide replace project backups?

No. Use disposable examples and proper backups. Learning exercises should not place important schoolwork, repositories or personal data at risk.

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 official reference.

Official and supporting references

Return to contents

Continue from here: Start Here · Tuition · Education · Pathways · Parenting 101 · All Site Routes

eduKate Punggol

Contact

83 Punggol Central, Singapore 828761

edu|Kate Bukit Timah

8 Fourth Avenue, Singapore 268674

By Appointment +65 8823 1234
admin@edukatesg.com

Email Us

When a child finally understands, school becomes less frightening and the future opens wider. Email us for the latest schedules and fees.

← 返回

感谢您的回复。 ✨

了解 eduKate Punggol 的更多信息

立即订阅以继续阅读并访问完整档案。

继续阅读