MultiAgent Kids

Chapter 3 · Keep a Record

How do we find
what changed?

In Chapter 2 you traced the number to its source. Seven seeds had sprouted in pot A by day 7. The editor needs to replace the 8 on the draft and keep both versions so teammates can see why it changed.

Compare the posters
The team lead in a yellow cap and the editor in round glasses compare two versions of the sprout poster in the greenhouse

Keep the draft and the change

The team commits the draft showing 8 as version 1. The editor creates a working branch from that version and uses the Chapter 2 count sheet to change 8 to 7.

The original draft with a circled 8 goes into a folder as the editor gets a pencil ready to change another copy
The original goes into the folder. The editor updates the copy on the table.
  1. SaveWrite 7 on the poster you are editing.
  2. StageSelect this change for the next version.
  3. CommitWrite why it changed and record the selected edit in your local history.

Spot the change

The two posters are side by side. Open the change log to see what changed, who edited it, and which record supports the change.

The original draft shows a circled sprout count of 8
Version 1 · DraftIt said 8 before the check.
The checked poster shows 7 in the same spot
Version 2 · CheckedThe original count sheet supports 7.

Poster change log

What changed?
The sprout count changed from 8 to 7.
Who changed it?
The editor.
What is the evidence?
The original count sheet for pot A on day 7.

Ask a teammate to review the change

Git records versions of your files on your computer. GitHub can host the team's shared repository. After you push your working branch, teammates who have access can review the change.

The editor in round glasses puts the poster in a shared tray while the curly-haired photographer checks the notebook
The editor puts the revised poster in the shared tray so a teammate can check it against the notebook.

Your computer

  1. Save the working copy
  2. Stage the selected changes
  3. Commit to local history
  4. Push the working branch

After the merge, switch to the matching shared branch on your computer, then pull the update.

Shared repository

  1. Receive the working branch
  2. Open a pull request
  3. A teammate checks the count sheet and the differences
  4. An authorized person merges into the target branch

Computer → shared repository Push the working branch

Computer ← shared repository Sync the merged version

The person in charge confirms which version will go on display.

Two people changed the same spot

The team lead and editor lay two different revisions on either side of the notebook
The two suggestions sit on either side of the original record.

Two branches start with the same draft showing 8. One changes that number to 7 and the other to 6. The merge pauses. Check the original count sheet for pot A on day 7, decide which number to keep, then record your choice and continue.

Check the evidencePot A · Day 7 · The original count sheet says 7

The count sheet supports 7. Resolve the conflict and write down the evidence, then have someone with permission complete the merge.

What comes after the shared version?

The team syncs the checked version. The person in charge then decides whether to put it on display. The science fair will also compare three pots. In the next chapter, you will put teamwork, checking, and recordkeeping together.

The team lead in a yellow cap holds the poster in front of an empty display board with three pots of sprouts on the greenhouse table
The poster is still off the display board. Three pots of sprouts are ready to compare.

Version control in this story

A record helps people find the original, the reason for a change, and the version everyone shares. Real projects can use Git and GitHub to do this.

Keep versions on your computer
Saving updates your working copy. Staging selects the edits you want to record. A commit records them in your local history. A branch starts another line of work inside the same repository.
Share and review
Pushing sends your branch to GitHub. A pull request invites teammates to check the changes and their evidence. The merge can happen once the change is approved and someone with permission carries it out.
Fetch before updating
Fetching downloads remote updates while leaving your current branch as it is. Pulling fetches the updates and then integrates them into your current branch. To sync the shared version, first switch to the branch you actually want to update.
Merge, sync, and display
Merging locally updates the branch you currently have checked out on your computer. Merging on GitHub updates the target branch in the shared repository. After syncing, the person in charge confirms whether to put the poster on display.
Get to know repository tools

A repository stores files and their history. A remote is a name for the address of another copy of the repository. Cloning copies the repository and its history to your computer. Forking creates a remote copy under another account or organization.

An issue tracks tasks or discussions. A README explains how to use the project. Markdown formats instructions and pull requests. GitHub Actions can run checks on a pull request when a committed workflow is set up to trigger on it. Look on the Checks tab for the results. Automatic deployment needs its own setup.

Try it in Git

Initialize a practice repository with a README and a first commit, then clone it. Find the actual default branch and create a working branch from it. Save, stage, and commit your work. Use a credential helper for HTTPS authentication, then push. Open a pull request with the correct source and target branches. Have a teammate review it and get approval before merging. Back on your computer, switch to the actual default branch and sync. If a fast-forward-only update stops because the histories have diverged, check what happened before you continue. Your account password cannot be used as the HTTPS Git password. Keep your token in the credential helper.

Check your understanding in five questions
  1. What does committing update? What does pushing update?

    A commit records a version in your local history. A push sends versions to the remote.

  2. Does fetching change your current branch?

    Your current branch stays as it is. You can inspect what was fetched first.

  3. How is a branch different from a fork?

    A branch lives in the same repository. A fork creates a separate remote copy.

  4. What does merging locally update? What about merging on GitHub?

    A local merge updates the current branch on your computer. A merge on GitHub updates the target branch in the shared repository.

  5. What two things happen when you pull?

    Fetch the remote updates, then integrate them into the current branch.