Guide 02 · Git & the Terminal — The Video Game Edition 🎮

Everything from Guide 01, explained the way a gamer already thinks: save points, cloud saves, creative mode.

← All guides

0% of steps checked — your progress is saved in this browser

Here is a secret: if you play games, you already understand programming tools. You just know them by different names. These notes translate five "grown-up" tools into gamer language. Short sections, lots of practice. When you see 🕹️ Quest, open the 🕹️ Practice Terminal (button, bottom-right) — it is a sandbox world where nothing can break, ever.

1The Terminal = the command console

Ever typed /tp or /give in Minecraft? Then you have already used a command console. The terminal is exactly that — but for your whole computer. You type an exact command, the computer does exactly that thing. No menus, no clicking around.

There are really only six moves. Think of them like the buttons on a controller:

MoveCommandIn game terms
Where am I?pwdOpen the map — shows your exact position
What's here?lsLook around the room / open the chest
Go therecd worldWalk through the door called world
Go backcd ..Walk back out to the previous room
Build a roommkdir basePlace a new empty building called base
Craft an itemtouch note.txtCreate a blank item; cat note.txt reads it
The golden combo: feeling lost is normal — even pros feel lost. The fix is always the same two buttons: pwd (where am I?) then ls (what's around me?). That combo is your minimap. Spam it as much as you want — it is free.
🕹️ Quest 1 · Learn to walk: open the Practice Terminal and type pwd, ls, cd world, cd ... The quest log on the right ticks itself. (On a phone the quest log is hidden — the commands still work.)

Quiz — you have no idea where you are. Which combo saves you?

pwd = open the map. ls = look around. That's the whole trick — every programmer does this a hundred times a day.

2File paths = coordinates

In Minecraft, every block has coordinates like X=120 Y=64 Z=-340. On a computer, every file has coordinates too — called a path. It lists the rooms you walk through to reach the file, joined by /:

/  (spawn point — the very top of everything)
  └─ home
      └─ student  (your home base = ~)
          └─ data
              └─ games.csv  → its coordinates: /home/student/data/games.csv

Two kinds of coordinates:

KindExampleGame version
Absolute (starts with /)/home/student/data/games.csvFull map coordinates — works from anywhere
Relativedata/games.csv"Two rooms to the left" — only works from where you're standing
Why care? When Python says FileNotFoundError, it means: "I walked to those coordinates and there was no chest there." The file isn't gone — you gave the wrong coordinates. Fix the path, and it works. Every. Single. Time.
🕹️ Quest 2 · Loot the chest: in the Practice Terminal, get into data, look around with ls, then open the loot with cat games.csv. That file is real video-game sales data — it comes back in Guide 03.

Quiz — your friend says "the file is in data/games.csv" but Python can't find it. Most likely reason?

data/games.csv is relative — it depends on where you stand. Absolute coordinates (starting with /) work from anywhere. That's why we prefer them for data files.

3Git = the save system

Imagine a game with no save points. You beat level 9, fall in lava on level 10, and restart from level 1. Horrible, right? Writing code without Git is exactly that. Git gives your project save points.

The save ritual has three buttons, always in the same order:

git init                    # ① new save slot — do this ONCE per project
git add .                   # ② choose what goes into the save (everything, here)
git commit -m "beat level 3"  # ③ SAVE, with a note so future-you remembers
git log                     # the load-game menu: every save you ever made
Why the note (-m "…")? Imagine a load menu where every slot just says "Save". Which one has the castle finished? No idea. Good notes = "beat level 3", "fixed the jump bug". Future-you will say thank you.
Why save often? Same reason you save before a boss fight. Tried something and broke everything? Git can roll you back to any earlier save point. Brave experiments become free — that is the whole superpower.
🕹️ Quest 3 · Save your game: build a project (mkdir my-game, cd my-game), open a save slot (git init), craft an item (touch player.txt), then do the ritual: git add . → git commit -m "level 1 done" → git log. This is THE quest to repeat 3 times.

Quiz — git commit -m "built the castle" is like…

Commit = a local save point with a note. Nothing goes online yet — that is what push is for (next section).

4GitHub = cloud saves + multiplayer

Your Git saves live on your own computer — like saves on one console. GitHub is the cloud-save server. Two commands talk to it:

git push     # UPLOAD your newest save points to the cloud
git pull     # DOWNLOAD the newest save points from the cloud

Why bother?

The multiplayer rule: pull when you sit down, push when you stand up. If you skip the pull, you are playing on an old version of the world while your teammate already rebuilt half of it.

Quiz — you sit down to work on a project you share with a friend. First command?

Pull first, always — otherwise you build on yesterday's world. Push comes at the end to share what you did. And init is only for brand-new projects.

5Branches = creative mode

You want to try a crazy build, but you don't want to wreck your survival world. So you copy the world and go wild in the copy. In Git that copy is called a branch:

git checkout -b creative   # copy the world, jump into the copy
touch castle.txt           # build something wild…
git add .
git commit -m "epic castle"
git checkout main          # jump back to the real world — no castle here!
git merge creative         # liked it? copy the castle into the real world
The magic moment is git checkout main: your castle vanishes — it only exists in the copy. Type ls and see for yourself. Then git merge creative brings it into the real world. If the experiment had gone badly, you would just… never merge. The real world stays untouched.
🕹️ Quest 4 · Creative mode: do exactly the six commands above in the Practice Terminal (you need a repo from Quest 3 first). Watch castle.txt disappear and come back — run ls after each checkout. Then 🕹️ Quest 5 · Cloud save: git push, git pull, and test your keycard with ssh -T git@github.com.

Quiz — your experiment on the creative branch went horribly wrong. What happens to main?

That's the whole point of branches: the real world (main) only changes when you choose to merge. Failed experiments cost you nothing.

6SSH keys = your keycard

How does GitHub know it's really you pushing, and not some random player? A password every time would be annoying. Instead you get a keycard — an SSH key. You make it once:

ssh-keygen -t ed25519 -C "you@example.com"   # press Enter at every question
cat ~/.ssh/id_ed25519.pub                    # show the PUBLIC half — copy it
How it works: the key comes in two halves. The public half (.pub) is the lock — you hand it to GitHub. The private half stays in your backpack forever and is the only thing that opens that lock. Never share the private half with anyone. Not even a best friend. Not even for Robux.

7The translation table — print me

Gamer wordReal wordCommand
Command consoleTerminal—
Open the map / look aroundWhere am I / list filespwd · ls
CoordinatesFile path/home/student/data/games.csv
New save slotNew repositorygit init
Choose what to saveStage changesgit add .
Save point + noteCommitgit commit -m "note"
Load-game menuHistorygit log
Cloud save upload / downloadPush / pullgit push · git pull
Creative-mode copyBranchgit checkout -b name
Copy build into the real worldMergegit merge name
KeycardSSH keyssh-keygen → add to GitHub

Boss fight (homework): close these notes and beat Quests 3, 4 and 5 from memory in the Practice Terminal. Tomorrow, do it once on your real computer. When the commands come out of your fingers without thinking — you've leveled up for real. Prefer to earn it in an actual game? Play 🕹️ Terminal Quest — Launch Night: 6 story levels, XP, and an SSH boss fight. Then use your new powers on real game data in Guide 03 · Video-Game Research 🎮📊. Want the same material with more grown-up detail? It's in Guide 01.

student@mpa:~$