A multiplayer role-playing game for learning Git collaboration, Pull Request hygiene, and surviving the chaos of a shared codebase.
Welcome to the Git Kitchen.
Before we write any code today, we need to talk about how modern software teams function. Imagine the client company is a massive, incredibly busy restaurant. Our software applications are the dishes we serve to thousands of hungry customers every day.
As Automation Testers, your job is vital: you write the automated recipes (test scripts) that ensure every single dish leaving our kitchen is perfect, safe, and up to standard.
But here is the problem: What happens when 20 different testers need to write, update, or fix those test recipes at the exact same time?
If everyone logs onto the same server and starts writing code in the same place, it's like 20 chefs crowding around one giant pot. Chef A adds salt for a login test. Chef B accidentally bumps the pot and spills in sugar for a checkout test. By the end of the day, the soup is ruined, the kitchen is on fire, and nobody knows whose fault it is. You would constantly be overwriting each other's work and breaking the test suite.
To prevent total kitchen disasters, the software industry uses a system called Version Controlβspecifically, a tool called Git.
Git is the ultimate kitchen management system. Instead of everyone cooking in the same giant pot, Git gives every single tester their own isolated, private prep station.
At your Git prep station, you can chop, season, experiment, and totally ruin your local code... and it will never affect the restaurant's master menu! You are perfectly safe.
How the kitchen flows:
- Prep Station (
branch): You grab a copy of the master recipe book and take it to your private prep station to work on a new test setup. - Plating (
commit): You frequently take snapshots of your dish as you cook so you never lose your progress. - Taste Test (
Pull Request): When your test is flawlessly passing, you bring it up to the expo window and ask a Senior QA to taste-test your code. - The Master Menu (
merge): Once approved, your recipe is officially folded into the team's master automation suite.
We are learning Git because it is the industry standard for teamwork. It gives us:
- Safety: You can't accidentally delete your teammates' work.
- Traceability (The Receipt): If a perfectly good test suddenly breaks tomorrow, Git lets us look at the receipt and see exactly who changed the recipe and when.
- Collaboration: It lets us build a massive automation framework together without stepping on each other's toes.
Before we start cooking, you'll need to make sure you have your basic kitchen utensils installed on your computer.
- Git: The management system itself. (Download at git-scm.com)
- A Code Editor: Your cutting board. We recommend VS Code (Download at code.visualstudio.com)
- A GitHub Account: Your chef profile where our master menu lives.
Checking Your Setup: Not sure if you have everything? We've written a quick script that acts as a health inspector. Open your terminal (PowerShell for Windows, Terminal for Mac) and run:
- On Windows:
.\verify-kitchen-setup.ps1 - On Mac/Linux:
./verify-kitchen-setup.sh
- Service Begins (Kickoff): Right now! We're opening the kitchen together during this lunch hour to set up our prep stations.
- Service Ends (Deadline): Before the weekend. All test recipes must be cooked, reviewed, and officially merged into the master menu before we close shop for the week!
By playing through Git Kitchen, you'll build real, hands-on experience mapping these kitchen workflows directly to your day-to-day work as an automation tester:
| Git Skill | Kitchen Analogy | Automation Tester Reality | Where You Practice It |
|---|---|---|---|
Cloning (git clone) |
Getting a personal copy of the master recipe book | Downloading the team's master test automation framework (e.g., Cypress, Playwright) to your laptop | Round 1 β Prep Station |
Branching (git branch) |
Setting up your own isolated prep station to experiment | Creating a safe space to write a new checkout test without breaking the nightly regression suite | Round 1 β Prep Station |
Committing (git commit) |
Plating your dish and writing down what you changed | Saving a snapshot of your test script locally once you get it passing on your machine | Round 2 β On the Pass |
Pushing (git push) |
Bringing your finished dish from your station to the pass | Backing up your finished test script from your laptop to the team's repository (like GitHub or GitLab) | Round 2 β On the Pass |
| Pull Requests (PR) | Asking the Head Chef to taste-test before it goes on the menu | Asking a Senior QA to review your code before it gets added to the CI/CD pipeline | Round 2 β On the Pass |
Fetching/Pulling (git pull) |
Hearing the Chef call out menu updates so you stay in sync | Downloading new page objects or helper functions a teammate just wrote so your own tests don't fail | Round 3 β Mise en Place |
Merging (git merge) |
The Head Chef officially adding your recipe to the main menu | The team officially adding your newly written test into the master regression suite | Round 3 β Mise en Place |
| Merge Conflicts | Two cooks trying to add different salt amounts to the same soup! | You and another tester both tried to update the exact same line in login-page-object.js |
Round 4 β Fire! |
The Head Chef owns the repository and is responsible for keeping the kitchen running smoothly. Their responsibilities include:
- Protecting the
mainbranch (no direct pushes!) - Reviewing and merging Pull Requests
- Resolving escalated merge conflicts
- Enforcing the Health Inspector Checklist (see PR template)
Line Cooks are the contributors. Each cook works on their own branch and submits Pull Requests to add recipes to the menu. Their responsibilities include:
- Creating a new branch for every recipe
- Writing clear, descriptive commit messages
- Submitting one recipe per Pull Request
- Reviewing a fellow cook's PR before your own gets merged
git-hygiene/
βββ README.md β You are here (the rulebook)
βββ menu.md β The shared menu (main dish)
βββ cheat-sheet.md β Quick Git command reference
βββ recipes/ β Where your recipe files live
β βββ .gitkeep
βββ .github/
βββ PULL_REQUEST_TEMPLATE.md β Health Inspector Checklist
Get your workstation ready before service begins.
Analogy: You can't cook without a recipe book or a cutting board. git clone gets you a copy of the kitchen's master recipe book, and git branch sets up your own personal prep station where you won't bump into anyone else.
Goal: Set up your local development environment.
Steps:
- Clone this repository to your local machine:
git clone https://github.com/<head-chef-username>/git-hygiene.git cd git-hygiene
- Confirm your remote is set up correctly:
git remote -v
- Create a new branch named after your recipe (use lowercase and hyphens):
git checkout -b recipe/your-recipe-name
Round 1 Complete when every cook has a local branch ready.
Cook your dish and send it up to the pass for review.
Analogy: As you cook, git commit is like taking a snapshot of your progress. When it's perfect, git push brings it to the expo window, and a Pull Request is when you ring the bell and ask the Head Chef to taste-test your work before serving it to customers.
Goal: Add a recipe file and open a Pull Request.
Steps:
- Create a new Markdown file for your recipe inside the
recipes/folder:# Example: recipes/classic-carbonara.md - Write your recipe using this template:
# Recipe Name **Prep Time:** 15 minutes **Cook Time:** 30 minutes **Serves:** 2β4 ## Ingredients - 200g ingredient one - 1 cup ingredient two ## Instructions 1. Step one 2. Step two
Tip: Always include units for times (e.g.
15 minutes) and a number or range for servings (e.g.2β4). - Stage and commit your file:
git add recipes/your-recipe-name.md git commit -m "feat: add classic carbonara recipe" - Push your branch to the repository:
git push origin recipe/your-recipe-name
- Open a Pull Request from your branch to the
mainbranch. - Fill out the Health Inspector Checklist in the PR description completely.
- Request a review from another Line Cook.
Round 2 Complete when every cook has an open PR with the checklist filled out.
Keep your workstation in sync while other cooks are working.
Analogy: While you were chopping onions, the Head Chef added 3 new dishes to the shared menu. git fetch and git pull are like checking the whiteboard to make sure you know what's going on before you try to serve your own dish.
Goal: Practice fetching and pulling upstream changes without overwriting your work.
Steps:
- While your PR is under review, fetch the latest changes from origin:
git fetch origin
- Switch to your local
mainbranch:git checkout main
- Merge the latest changes into your local
main:git merge origin/main
- Switch back to your recipe branch and rebase it on the updated
main:git checkout recipe/your-recipe-name git rebase main
- Force-push the rebased branch (since history was rewritten):
git push origin recipe/your-recipe-name --force-with-lease
Tip:
git fetchdownloads changes without applying them.git pullfetches and merges in one step. Preferfetch+rebaseto keep a clean history.
Round 3 Complete when every cook's branch is up to date with the latest main.
Two cooks edited the same line. Now it's chaos. Resolve it.
Analogy: A merge conflict happens when two cooks try to edit the exact same line of a recipe at the precise same time. Git won't guess who is rightβit stops everything and asks you (the humans) to decide which version makes it into the final dish!
Goal: Intentionally create and resolve a merge conflict in menu.md.
Steps:
- The Head Chef will merge one PR into
mainfirst. - All other cooks must now fetch and pull the updated
main:git fetch origin git rebase origin/main
- If Git reports a merge conflict in
menu.md, open the file and look for conflict markers:<<<<<<< HEAD Your version of the line ======= The other cook's version >>>>>>> origin/main - Edit the file to resolve the conflict β keep both contributions if possible!
- Stage the resolved file and continue the rebase:
git add menu.md git rebase --continue
- Push the resolved branch and update your PR.
Tip: Communication is the best merge conflict prevention. Use PR comments to coordinate who is editing which lines.
Round 4 Complete when all PRs are merged and menu.md lists every cook's recipe without conflicts.
The kitchen wins together when:
- Every Line Cook has a merged PR
-
menu.mdlists all recipes with no duplicate entries - All recipes are in the
recipes/folder - No one pushed directly to
main - Every PR had at least one approval
cheat-sheet.mdβ Quick Git command referencemenu.mdβ The shared menu.github/PULL_REQUEST_TEMPLATE.mdβ Health Inspector Checklist- Official Git Docs
- GitHub Docs: About pull requests