Chapter C48 · Interactive Course

A workspace and its change history

Folders, repositories, diffs, commits, worktrees and publication.

Start chapter in web app

Core Learning Concept

Inspect the proposed repair through its files, change history, and check results. Confirm the working folder, read the diff with surrounding code, and distinguish editing, recording history, sharing, and deployment. Use the evidence for each state rather than treating a summary saying “fixed” as proof that users have the change.

What You’ll Learn in This Chapter

  1. The terminal runs commands in a folder

    Activity 1 of 8 · 4 min

    Identify the working directory before a command.

    A terminal runs commands in a process with a current working directory. A relative path is usually resolved from that directory unless the command specifies otherwise. The editor and agent may use different folders. Confirm the location before interpreting file paths or running a project command.

    Start activity →

  2. A repository tracks a project

    Activity 2 of 8 · 4 min

    Separate a folder from its version-history repository.

    A repository is a project tracked by a version-control system such as Git. It stores recorded history as well as supporting work on current files. A folder is not automatically a repository. Other recovery mechanisms may exist, but version control provides an explicit way to inspect and restore recorded changes.

    Start activity →

  3. A diff shows a proposed change

    Activity 3 of 8 · 4 min

    Read added and removed lines.

    A diff highlights added and removed lines against existing code. Never rely on verbal summaries when evaluating code modifications; inspect the exact deletions and insertions to understand true behavioral changes.

    Start activity →

  4. A commit records a snapshot

    Activity 4 of 8 · 4 min

    Distinguish edited, staged and committed states.

    In Git, editing changes the working files, staging selects content for a commit, and committing records a snapshot in local history. Backups and other recovery options may also exist. A deliberate checkpoint makes later changes easier to compare and recover, but committing does not publish them to users.

    Start activity →

  5. Branches and worktrees separate work

    Activity 5 of 8 · 4 min

    Explain separate histories and separate working folders.

    A Git branch defines an independent commit timeline, whereas a worktree checks out files into a distinct working directory. Both isolate changes, but neither isolates shared local databases or running port listeners.

    Start activity →

  6. A test runs a check

    Activity 6 of 8 · 5 min

    Distinguish a test command from its actual result.

    Software tests provide rigorous evidence only through actual execution commands, environment variables, exit codes, and assertion logs. Never mistake an agent's persuasive verbal assurance of success for genuine verified test execution.

    Start activity →

  7. Local work is different from publication

    Activity 7 of 8 · 4 min

    Distinguish a commit, remote push and deployed change.

    A local edit changes a checkout; a commit records it; a push shares Git history; deployment changes a served environment. Projects can use different workflows, but none of these states should be assumed from another. Verify the environment users actually reach before calling a local repair a release.

    Start activity →

  8. Review before accepting

    Activity 8 of 8 · 6 min

    Inspect a fictional change, its test output and history, and mark what is edited, tested, saved in history and still unpublished.

    Start activity →