Guide 01 · The Terminal, File Paths, Git & GitHub

Step-by-step notes you can practice again and again — with a built-in practice terminal.

← All guides

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

These notes teach the five tools we use in class: the terminal, file paths, VS Code, Git & GitHub, and SSH. Read a step, do it on your own computer, then tick the checkbox. The skills only stick if you repeat them 2–3 times — that is what the ⚡ Practice Terminal button (bottom-right) is for: a safe fake terminal inside this page where nothing can break.

1The Terminal — talking to your computer with words

The terminal is a window where you type commands instead of clicking icons. Programmers use it because it is faster, exact, and it is how you use Git, SSH and remote computers.

1.1 Open a terminal

You will see a prompt — a line ending in $ (or >) that waits for you to type:

student@mpa:~$ ← the prompt. "~" means you are in your home folder

1.2 The four commands you will use every single day

pwd            # "print working directory" — WHERE am I?
ls             # "list" — WHAT is in this folder?
cd data        # "change directory" — GO into the folder called data
cd ..          # go UP one level (back to the parent folder)
Why memorize these? Every terminal task is a loop of: where am I? (pwd) → what's here? (ls) → go there (cd). When you feel lost, type pwd then ls.

Two more you'll need this week:

mkdir my-project     # make a new folder called my-project
cat notes.txt        # show the contents of a file on screen

1.3 The superpower: Tab completion

⚡ Try it now: open the Practice Terminal (button bottom-right) and finish Mission 1: Look around. Type pwd, ls, cd projects, pwd. Watch the mission boxes tick themselves.

Quiz — you are lost in the terminal. What is the FIRST command to type?

pwd tells you where you are. Then ls shows what's around you. Lost → pwd → ls.

2File Paths — your computer's street addresses

A path is the address of a file. In class, when Python said it could not find your data, the path was wrong. Here is the picture to keep in your head — folders inside folders:

/  (the root — the very top)
  └─ Users
      └─ student  (your home folder = ~)
          └─ data
              └─ titanic.csv  → full path: /Users/student/data/titanic.csv
KindExampleMeaning
Absolute/Users/student/data/titanic.csvFull address from the root. Starts with /. Always works.
Relativedata/titanic.csvAddress starting from where you are now. Short, but breaks if you move.
Shortcuts~   .   ..home folder · this folder · parent folder

2.1 How to FIND a file's path (3 easy ways)

2.2 Using the path to read data in Python

import pandas as pd
df = pd.read_csv("/Users/student/data/titanic.csv")  # paste the path INSIDE quotes
df.head()
The #1 beginner error — FileNotFoundError means exactly one thing: the path in the quotes does not match where the file really is. Fix: find the real path with a trick above and paste it again. It is never magic, it is always the path.
⚡ Try it now: Practice Terminal → Mission 2: Find the data. Get yourself into ~/data, then use pwd, ls and cat titanic.csv.

Quiz — which path works no matter which folder you are standing in?

Absolute paths (starting with /) are full addresses — they work from anywhere. The other two are relative: they only work if you happen to be standing in the right folder.

3VS Code — your coding workbench

Visual Studio Code (VS Code) is the free editor we use. It shows your files on the left, your code in the middle, and it has a terminal built right in.

Why VS Code + terminal together? One window does everything: edit code, see your files, run commands, use Git. That's why professionals live inside it.

4Git & GitHub — a save-game system for code

Git = a program on your computer that takes snapshots ("commits") of a project folder, like save points in a video game. GitHub = a website that stores a copy of those snapshots online so you can back up, share, and work with others.

4.1 One-time setup (tell Git your name)

git config --global user.name  "Your Name"
git config --global user.email "you@example.com"

4.2 Start a new repo — and make your first commit

A repository (repo) is just a folder that Git is watching. The everyday rhythm is status → add → commit:

mkdir my-project          # 1. make the folder
cd my-project             # 2. go inside
git init                  # 3. tell Git: start watching this folder
touch README.md           # 4. create a first file (touch = make empty file)
git status                # 5. ask Git what changed — it sees README.md is new
git add README.md         # 6. put the file in the "photo frame" (staging)
git commit -m "first commit"   # 7. take the snapshot, with a message
git log                   # 8. see your history of snapshots
Why two steps (add, then commit)? git add chooses which changes go in the photo; git commit takes the photo. This lets you snapshot only the files you mean to. Tip: git add . stages everything in the folder.

4.3 Connect it to GitHub and push

git remote add origin git@github.com:YOURNAME/my-project.git   # link folder ↔ website (once)
git push -u origin main    # upload your commits ("push" = send up)

Refresh the GitHub page — your files are online. After the first time, uploading is just git push.

4.4 Why pull?

git pull     # download the newest commits from GitHub into your folder
Why: if the online copy is newer than yours — a teammate pushed, or you edited on another computer, or on the GitHub website — git pull brings your folder up to date. Habit: pull before you start working, push when you stop.

4.5 Why (and how) merge?

A branch is a side copy of your project where you can experiment without touching the main version. Merging folds your experiment back into main when it works:

git checkout -b feature   # make a branch called "feature" and jump onto it
touch idea.txt            # ...experiment freely here...
git add .
git commit -m "try an idea"
git checkout main         # jump back to the main version — idea.txt is NOT here!
git merge feature         # fold the experiment into main — now it is
Why: branches let you try things without fear — if the experiment fails, main is untouched; if it works, merge keeps it. This is also how teams work: each person builds on a branch, then merges.
⚡ Try it now: Practice Terminal → Mission 3: Your first repo, then Mission 4: Branch & merge. This is THE thing to repeat 3 times until your fingers know it.

Quiz — you sit down to work on a shared project. What do you run FIRST?

git pull first — grab the newest version before you start, so you're not working on old code. Push comes at the end, to share what you did.

Quiz — what does git commit -m "fix bug" actually do?

Commit = local save-point. Nothing goes online until you git push.

5SSH — a secure tunnel to another computer

SSH (Secure Shell) lets your terminal control another computer over the internet — everything you type runs there. It is also how Git talks to GitHub without asking for your password every time.

ssh username@computer-address     # e.g.  ssh student@lab.school.edu
# ...now your prompt belongs to the OTHER computer. Type "exit" to come home.

5.1 Make an SSH key (one time) — a lock-and-key pair

ssh-keygen -t ed25519 -C "you@example.com"   # press Enter at every question
cat ~/.ssh/id_ed25519.pub                    # show your PUBLIC key — copy this line
How the key works: the public key (.pub) is the lock — you give it to GitHub. The private key stays on your computer and never leaves — it is the only key that opens the lock. That's why there is no password to steal.

5.2 Mission 6 — your first real handshake with a real server

Everything in 5.1 was setup. This is the payoff: you are going to open an SSH connection to an actual server on the other side of the internet — GitHub's — and have it recognise you by your key, with no password. Nothing here is simulated.

ssh -T git@github.com
# first time it asks about a "fingerprint" — type: yes
# no password needed. Your KEY is the password — that's the whole point!
Why the fingerprint question? The first time you connect, SSH shows the server's "fingerprint" and asks if you trust it. After you say yes once, SSH remembers it — and will loudly warn you if the server ever changes (which could mean someone is pretending to be it).
Where do I get a shell to roam around in? GitHub deliberately doesn't give you one. When you need a real Linux machine to explore, the usual routes are a free cloud shell (GitHub Codespaces, Google Cloud Shell), a Linux VM on your own laptop, or WSL on Windows — and every command in these notes works the same way on all of them. Ask in class and we'll set one up together.
⚡ Try it now: Practice Terminal → Mission 5: Sync with GitHub — it ends on ssh -T git@github.com, the same command you just ran for real.

6Cheat sheet — print me

I want to…Command
See where I am / what's herepwd · ls
Move into / out of a foldercd folder · cd ..
Make a folder / empty filemkdir name · touch name
Start watching a folder with Gitgit init
See what changedgit status
Save a snapshotgit add . then git commit -m "message"
See historygit log
Upload / download vs GitHubgit push · git pull
Experiment safely, then keep itgit checkout -b name … git checkout main · git merge name
Control another computerssh user@address (leave with exit)
Check my key works against GitHubssh -T git@github.com

Your homework: close these notes, open the ⚡ Practice Terminal, and redo Missions 3 and 4 from memory. Then do Mission 6 (section 5.2) for real — ssh -T git@github.com, against a real server, with your own key. That's how it becomes yours.

student@mpa:~$