# The Shared Kitchen

AI Kitchen · Episode 3/8 · 23 min

> Nephew Bin joins. Git for beginners: history, worktrees, merging, conflicts, pull requests, and the house rules for a shared repo.

- URL: https://academy.stoicsoft.com/en/courses/ai-kitchen/lessons/ep-3-the-shared-kitchen
- YouTube: https://www.youtube.com/watch?v=309rpY5a6mU
- Tiếng Việt: https://academy.stoicsoft.com/vi/courses/bep-ai/lessons/tap-3-bep-chung

Bin wants to help with the Tết menu while two AI agents work on the loyalty app. Everyone edits the same file, and chaos follows. Tú introduces the dish's photo album (history), a prep station for everyone (worktrees), merging the pots, presenting the dish (pull requests), who seasoned this pot (agent changes), the suggestion box (issues and CI), and the recipe vault in the cloud (GitHub).

24 new words, from History to Small commit. Honest note: merge conflicts still happen, and an AI can resolve them wrongly. You still taste.

## What you will learn

- Git history as a photo album, and going back to any version (git revert)
- Git worktrees: a separate prep station for every cook, human or AI
- Merging, and what a merge conflict really is
- Pull requests: presenting the dish for approval
- Seeing which AI agent changed what
- Issues, CI pipelines, push and pull, and house rules for a shared repo

## Chapters

- 0:00 Opening: One more cook in the kitchen
- 1:28 Chapter 1: The dish's photo album
- 4:15 Chapter 2: A prep station for everyone
- 6:57 Chapter 3: Merging the pots
- 9:52 Chapter 4: Presenting the dish
- 12:37 Chapter 5: Who seasoned this pot?
- 15:16 Chapter 6: The suggestion box
- 17:42 Chapter 7: The recipe vault in the cloud
- 19:51 Chapter 8: Shared kitchen rules

## Vocabulary (24)

- **History** — the list of every save
- **Version** — one saved state
- **Revert** — undo exactly one change
- **Worktree** — your own prep station
- **Main** — the main branch customers use
- **Env file** — the file with the secret keys
- **Merge** — combine a branch into main
- **Conflict** — two people changed the same spot
- **Resolve** — settle a conflict
- **Pull request** — asking to merge, for review
- **Approve** — agree to merge
- **Draft** — not ready to present yet
- **Overwrite** — writing over someone else's work
- **Collision** — two cooks on the same file
- **Referee** — suggests how to combine
- **Issue** — a recorded bug or suggestion
- **Label** — a sorting tag
- **CI** — automatic checks on every change
- **Push** — send changes up to GitHub
- **Pull** — bring new changes down
- **Clone** — copy a whole project to another PC
- **Fork** — someone's own copy to remix
- **Commit message** — the note on each save
- **Small commit** — one job per save

## Try it now

1. Open Git → History in your project, click the latest save, and read the green and red text.
   - Prompt for the AI: `Explain in plain words: what did the latest commit change?`
2. Create a new worktree called experiment, open an agent in it, and ask it to change a button color. Back on main, nothing changed.
   - Prompt for the AI: `Change the order button to a festive Tết red.`
3. Make a small conflict on purpose: two worktrees change the same heading line, then merge both into main.
   - Prompt for the AI: `There is a merge conflict. Explain how the two versions differ, then suggest how to combine them.`
4. Open the Repo panel → Pull requests in a GitHub project, open a pull request and click Send to AI.
   - Prompt for the AI: `Read this pull request and give me three notes: what's good, what needs fixing, and what's risky.`
5. Open Agent Changes, set the project to Watch, let two agents work, then check the Map: who is editing which file.
6. Turn three pieces of customer feedback into three labelled issues, then send one to an agent.
   - Prompt for the AI: `Read this issue, tell me what might be causing it and how you'd fix it. Don't change anything yet.`
7. Push your project to a private GitHub repo with the Push button, then clone it into another folder.

## Transcript

https://academy.stoicsoft.com/md/en/courses/ai-kitchen/lessons/ep-3-the-shared-kitchen?transcript=1

---

Previous: [The Kitchen Brigade](https://academy.stoicsoft.com/en/courses/ai-kitchen/lessons/ep-2-the-kitchen-brigade)
Next lesson: [The House Recipe Book](https://academy.stoicsoft.com/en/courses/ai-kitchen/lessons/ep-4-the-house-recipe-book)
